JPS6326587B2 - - Google Patents

Info

Publication number
JPS6326587B2
JPS6326587B2 JP55044307A JP4430780A JPS6326587B2 JP S6326587 B2 JPS6326587 B2 JP S6326587B2 JP 55044307 A JP55044307 A JP 55044307A JP 4430780 A JP4430780 A JP 4430780A JP S6326587 B2 JPS6326587 B2 JP S6326587B2
Authority
JP
Japan
Prior art keywords
signal
circuit
run
prediction error
level
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
Application number
JP55044307A
Other languages
Japanese (ja)
Other versions
JPS56141671A (en
Inventor
Shoji Mizuno
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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP4430780A priority Critical patent/JPS56141671A/en
Priority to US06/207,500 priority patent/US4344086A/en
Priority to CA000365014A priority patent/CA1165861A/en
Publication of JPS56141671A publication Critical patent/JPS56141671A/en
Publication of JPS6326587B2 publication Critical patent/JPS6326587B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Fax Reproducing Arrangements (AREA)
  • Color Image Communication Systems (AREA)

Description

【発明の詳細な説明】[Detailed description of the invention]

本発明は、カラー画像信号を符号化によりデー
タ圧縮し、伝送時間の短縮あるいは蓄積メモリ容
量の削減を行なうカラー画像信号符号化装置に関
する。 従来のカラー画像信号の符号化法の一つに、モ
ードランレングス符号化法がある。これは、カラ
ー画像信号において同じ色の続きをランと呼ぶと
き、ランの長さを指定するランレングス符号とラ
ンの色を指定するモード符号によりカラー画像信
号を符号化するものである。 モードランレングス符号化法は、各色、各ラン
長の出現頻度に応じてモード符号、ランレングス
符号を定める。しかしこれらの符号は、黄色の次
には橙色が出現しやすいなどという異なる色の間
の相関は無視して定められており、あまり効率的
な符号化法とはいえない。 本発明の目的は、異なる色の間の相関関係をも
十分考慮に入れた効率のよいカラー画像信号符号
化装置を提供することにある。 本発明によれば、すでに入力ずみのN(2n-1
N2n)色のカラー画像信号Sに基づき次に入力
される画像信号xを予測するN個の信号値を予測
適中率順に並べる手段と、前記画像信号xの実際
の信号値が前記並べられた信号値の何番目に一致
するかその順位を検出する手段と、前記順位に対
応する高々n個の予測誤差信号ei(1in)
を発生して前記画像信号xを予測符号化する手段
と、前記各予測誤差信号ei(1in)が0で
ある確率の高さを示すモード信号Miを、i=1
のときは前記カラー画像信号S及びi−1個の予
測誤差信号ej(1ji−1)に基づき発生す
る手段と、前記各予測誤差信号ei(1in)
をそれに対応する各モード信号Mi(1in)
に基づきグループ分けした後に圧縮符号化する手
段とを有するカラー画像信号符号化装置が得られ
る。 以下図面を用いて本発明について詳細に説明す
る。 第1図は本発明の符号化装置のブロツク図であ
る。予測符号化回路2はカラー画像を光電変換し
て得られるカラー画像信号1を入力し、参照画像
信号Sに基づき現在入力中の画像信号xの予測を
行ないその予測誤差信号3を圧縮符号化回路4に
送る。又、制御回路6により前記予測符号化回路
2および圧縮符号化回路4の制御が行なわれる。
参照画像信号Sの1例を第2図に示す。第2図に
おいて点線は画像の主走査線を示し、これに沿つ
て画像は左から右へ走査され、右端に到達すると
その下の主走査線の左端から走査が続けられる。
丸印で示されたa、b、c、dは参照画像信号S
を構成する4個の画素である。二重丸印で示され
たxは注目画像信号で、x以前に走査ずみの参照
画像信号S=(a、b、c、d)に基づきxは予
測され、その予測誤差が圧縮符号化される。第2
図ではSを構成する画素は4個としたが5個、6
個とより多くの画素からなるSでもよいし、また
dを除いたa、b、c3個というようにもつと少な
い画素からなるSでもよい。 ただSを構成する画素数を余り少なくすると符
号化効率が減少し、逆に多くすると予測符号化回
路の規模をいたずらに大きくする結果となる。以
下Sは第2図に示すようにxに隣接するa、b、
c、d4画素からなるとして説明を行なうことに
する。第1図にもどつて説明をつづける。予測誤
差符号化回路4は予測誤差信号3を圧縮符号化
し、予測誤差符号化信号5として出力する。制御
回路6はクロツク信号、制御信号、同期信号を送
出し各回路を制御する。 第3図は8色(黒、赤、橙、黄、紫、青、緑、
白)のカラー画像信号に対する予測符号化回路2
の一実施例を示すブロツク図である。すでに述べ
たようにSは第2図の4画素a、b、c、dから
なるとし、また各色を第1表の中央欄に示すよう
3ビツトの2進数で表現することにする。第1表
の右欄にはそれを10進数で示してある。もちろん
本例を拡張してもつと多数の画素からなるSおよ
びさらに多くの色を有するカラー画像信号に対す
る回路を構成することが可能なことはいうまでも
ない。
The present invention relates to a color image signal encoding device that compresses color image signals through encoding to reduce transmission time or storage memory capacity. One of the conventional encoding methods for color image signals is the mode run length encoding method. This is to encode a color image signal using a run length code that specifies the length of the run and a mode code that specifies the color of the run, when a continuation of the same color in a color image signal is called a run. In the mode run-length encoding method, a mode code and a run-length code are determined according to the appearance frequency of each color and each run length. However, these codes are determined without regard to the correlation between different colors, such as the fact that orange is more likely to appear next to yellow, and cannot be said to be a very efficient encoding method. An object of the present invention is to provide an efficient color image signal encoding device that takes into account the correlation between different colors. According to the present invention, the already input N(2 n-1 <
N2 n ) means for arranging N signal values for predicting the next input image signal x based on the color image signal S of the color in order of prediction accuracy, and the actual signal values of the image signal x being arranged in the order of the predicted accuracy; a means for detecting the rank of the signal value, and at most n prediction error signals e i (1in) corresponding to the rank;
means for predictively encoding the image signal x by generating a mode signal M i indicating the high probability that each prediction error signal e i (1in) is 0, i=1
In this case, means for generating based on the color image signal S and i-1 prediction error signals e j (1ji-1), and means for generating each prediction error signal e i (1in)
and the corresponding mode signal M i (1in)
There is obtained a color image signal encoding device having means for compression encoding after grouping based on the following. The present invention will be explained in detail below using the drawings. FIG. 1 is a block diagram of an encoding apparatus according to the present invention. A predictive encoding circuit 2 inputs a color image signal 1 obtained by photoelectrically converting a color image, predicts an image signal x currently being input based on a reference image signal S, and transmits the prediction error signal 3 to a compression encoding circuit. Send to 4. Further, the predictive encoding circuit 2 and the compression encoding circuit 4 are controlled by the control circuit 6.
An example of the reference image signal S is shown in FIG. In FIG. 2, the dotted line indicates the main scanning line of the image, along which the image is scanned from left to right, and when the right end is reached, scanning continues from the left end of the main scanning line below.
A, b, c, d indicated by circles are reference image signals S
These are the four pixels that make up the image. x indicated by a double circle is the image signal of interest, and x is predicted based on the reference image signal S = (a, b, c, d) scanned before x, and its prediction error is compressed and encoded. Ru. Second
In the figure, the number of pixels composing S is four, but there are five and six pixels.
The S may be made up of a larger number of pixels, or the S may be made up of fewer pixels, such as three pixels a, b, and c excluding d. However, if the number of pixels constituting S is too small, the encoding efficiency will decrease, and if it is increased, the scale of the predictive coding circuit will become unnecessarily large. Hereinafter, S is a, b, adjacent to x, as shown in Figure 2.
The explanation will be given assuming that it consists of 4 pixels c and d. Returning to FIG. 1, the explanation will be continued. The prediction error encoding circuit 4 compresses and encodes the prediction error signal 3 and outputs it as a prediction error encoded signal 5. The control circuit 6 sends out clock signals, control signals, and synchronization signals to control each circuit. Figure 3 shows eight colors (black, red, orange, yellow, purple, blue, green,
Predictive encoding circuit 2 for color image signals (white)
FIG. 2 is a block diagram showing one embodiment of the invention. As already mentioned, S is assumed to consist of the four pixels a, b, c, and d shown in FIG. 2, and each color is expressed as a 3-bit binary number as shown in the center column of Table 1. The right column of Table 1 shows it in decimal notation. Of course, by expanding this example, it is possible to configure a circuit for S consisting of a large number of pixels and a color image signal having even more colors.

【表】 本予測符号化回路においては、第3図に示すご
とく3ビツトのカラー画像信号1が3(l+2)
ビツトのシフトレジスタ7に入力される。ここで
lは一主走査線当りの画素数を表わす。順位決定
ROM8はシフトレジスタ7からa、b、c、d4
画素(各画素3ビツト)をアドレスデータとして
入力し、それに基づきxを一致する確率の最も高
い色をα1(3ビツト)、2番目に一致する確率の高
い色をα2(3ビツト)、同様に3番目から8番目に
一致する確率の高い色をα3、α4、α5、α6、α7、α8
(各3ビツト)と定め、データ(3×8ビツト)
として出力する。順位信号選択回路9は、αi(i
=1〜8)とxを入力し、xと一致するaixを検
出しix−1を3ビツトで表現しe1、e2、e3として
出力する。以後eiを第iビツトの予測誤差信号と
呼ぶ。このように予測誤差信号ei(i=1〜3)
を定めれば各eiは0である確率が1である確率よ
り常に高く各eiは一次元ランレングス符号化に適
した信号になる。 また、各eiはSとxに基づき発生されるので、
本回路は、Sとxとの相関を十分に利用した予測
符号化回路である。Sとxは一般に異なる色であ
るから、本回路は異なる色の間の相関を利用して
いる予測符号化回路である。 S=(a、b、c、d)がS1=(4、3、4、
5)およびS2=(2、7、6、1)の場合をとり
あげて具体的に説明しよう。ここで画素a、b、
c、dの色を10進数で示したが、色と10進数の関
係は第1表に示してある。P(x|S)を参照画
像信号がSなるとき、注目画像信号xである条件
付確率とし、P(x|S1)、P(x|S2)がたとえ
ば第2表、第5表のごとくだとしよう。第4図、
第5図にこれらをグラフ化して示してある。P
(x|S1)は単峰性、P(x|S2)は双峰性であ
る。第3表、第6表にS=Sj(j=1、2)に対
するα1、P(αi|Sj)を示した。番号iが増加す
るに従いP(αi|Sj)が減少するようにαiは定めら
れている。ここでP(αi|Sj)は、参照画像信号
S=Sjなるとき注目画像信号x=αiとなる条件付
確率である。二つ以上のレベルに対して全く同じ
確率でxの発生が見込まれる場合にはより高いレ
ベルを若い添字番号のαiに対応させる。順位決定
ROM8は、S=Sj(j=1、2)に基づき、第3
表、第6表に示すごとくSjに対するαi(i=1〜
8)を出力する。選択回路9はαi(i=1〜8)
とxを入力し、S=Sj(j=1、2)のとき第2
表、第5表のごとくe=(e1、e2、e3)を定める。
第2表、第5表においてiはP(x|Sj)がS=
Sjのときi番目に大きいことを示し、すでに述べ
たように予測誤差信
[Table] In this predictive encoding circuit, the 3-bit color image signal 1 is 3(l+2) as shown in Figure 3.
The signal is input to the bit shift register 7. Here, l represents the number of pixels per main scanning line. Ranking determination
ROM8 is a, b, c, d4 from shift register 7
Input pixels (3 bits for each pixel) as address data, and based on that, select the color with the highest probability of matching x with α 1 (3 bits), the color with the second highest probability of matching with α 2 (3 bits), Similarly, the colors with a high probability of matching from 3rd to 8th are α 3 , α 4 , α 5 , α 6 , α 7 , α 8
(3 bits each), data (3 x 8 bits)
Output as . The rank signal selection circuit 9 selects α i (i
=1 to 8) and x are input, aix that matches x is detected, ix -1 is expressed in 3 bits, and output as e1 , e2 , and e3 . Hereinafter, e i will be referred to as the i-th bit prediction error signal. In this way, the prediction error signal e i (i=1 to 3)
If , the probability that each e i is 0 is always higher than the probability that it is 1, and each e i becomes a signal suitable for one-dimensional run-length encoding. Also, since each e i is generated based on S and x,
This circuit is a predictive encoding circuit that fully utilizes the correlation between S and x. Since S and x are generally different colors, this circuit is a predictive encoding circuit that utilizes the correlation between different colors. S = (a, b, c, d) is S 1 = (4, 3, 4,
5) and S 2 = (2, 7, 6, 1) will be specifically explained. Here, pixels a, b,
The colors c and d are shown in decimal numbers, and the relationship between colors and decimal numbers is shown in Table 1. Let P(x|S) be the conditional probability that the image signal of interest is x when the reference image signal is S, and P(x|S 1 ) and P(x|S 2 ) are shown in Tables 2 and 5, for example. Let's say it's like this. Figure 4,
These are shown graphically in FIG. P
(x|S 1 ) is unimodal, and P(x|S 2 ) is bimodal. Tables 3 and 6 show α 1 and P(α i |S j ) for S=S j (j=1, 2). α i is determined such that P(α i |S j ) decreases as the number i increases. Here, P(α i |S j ) is the conditional probability that the target image signal x=α i when the reference image signal S=S j . If x is expected to occur with exactly the same probability for two or more levels, the higher level is associated with α i having a smaller subscript number. Ranking determination
ROM8 is based on S=S j (j=1, 2), and the third
As shown in Table 6, α i (i = 1~
8) is output. The selection circuit 9 is α i (i=1 to 8)
and x, and when S=S j (j=1, 2), the second
As shown in Table 5, e=(e 1 , e 2 , e 3 ) is determined.
In Tables 2 and 5, i is P(x|S j ) is S=
S j indicates the i-th largest prediction error.

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】 号eはi−1に等しい。たとえばS=S1、x=5
のとき、第3表に示すように第2番目に大きい条
件付確率P(α2|S1)=0.20を有するα2=5とxが
一致するので、第6表に示すようにe=ix−1=
2−1=1=(0、0、1)が予測誤差信号とし
て選択回路9より出力される。S=Sj(j=1、
2)に対し第2表、第5表から、eの各ビツトei
(i=1〜3)が0あるいは1となる確率P(ei
Sj)(i=1〜3、j=1、2)が次のように計
算できる。 P(e1=0|Sj)=4i=1 P(αi|Sj) P(e1=1|Sj)=1−P(e1=0|Sj) P(e2=0|Sj)=2i=1 P(αi|Sj) +6i=5 P(αi|Sj) P(e2=1|Sj)=1−P(e2=0|Sj) P(e3=0|Sj)=P(α1|Sj)+P(α3|Sj) +P(α5|Sj)+P(α7|Sj) P(e3=1|Sj)=1−P(e3=0|Sj) 第4表、第7表にその計算結果を示す。第4
表、第7表において各ei(i=1〜3)は0にな
る確率が1になる確率より常に高い。ei(i=1
〜3)がなぜこのよう性質を有するかS=S2の場
合を例に上げ以下に説明しよう。第6図のa,
b,cにS=S2のときにx=αiとなる確率P(α1
|S2)(i=1〜8)をαiを横軸にしてグラフ表
示してある。a,b,cすべて同じグラフである
が斜線のつけ方が異なる。斜線部の意味について
は後で説明する。第5図にS=S2のときにxの発
生する確率P(x|S2)(X=0〜7)がxを横軸
にしてグラフ化されているが、第5図のP(x|
S2)を大きい順に左につめて並び変えたものが第
6図a,b,cである。P(x|S2)は双峰性の
分布であつたがP(αi|S2)においては大きい順
に左から並び変えられ右下りの分布となつてい
る。その作成法から明らかなようにP(x|S)
がどんな型の分布であろうと一般にP(αi|S)
はαiの添字iに関し単調減少であり、P(αi|S)
は右下りの分布となる。S=S2の場合を例に上げ
説明しているが、以下の説明はP(αi|S)が右
下りの分布であるということのみに基づいている
ので、一般のSの場合に成立する。したがつて第
7図aの斜線部(x=α1〜α4、e=0〜3すなわ
ちe1=0に相当)は空白部(x=α5〜α8、e=4
〜7すなわちe1=0に相当)より広いのでe1=0
の確率はe1=1の確率より高い。同様に第7図b
の斜線部(x=α1、α2、α5、α6、e=0、1、
4、5すなわちe2=0に相当)は空白部(x=
α3、α4、α7、α8、e=2、3、6、7すなわちe2
=1に相当)より広いのでe2=0の確率はe2=1
の確率より高い。さらに第7図dの斜線部(x=
α1、α3、α5、α7、e=0、2、4、6すなわちe3
=0に相当)は空白部(x=α2、α4、α6、α8、e
=1、3、5、7すなわちe3=1に相当)より広
いのでe3=0の確率はe3=1の確率より高い。以
上でei(i=1〜3)は常に0である確率が1で
ある確率より高いことがわかつた。 以上誤差信号e1、e2、e3の発生方法について説
明してきたが、次に第1、2、3モード信号M1
M2,M3の発生方法について説明しよう。いまま
でe1、e2、e3に関する確率は参照画像信号Sのみ
を条件にして考察してきたが、これからはe2に対
してはSの他にe1を、e3に対してはSの他にe1
e2を条件としてくりこんで考える。これらあらた
に考え出された条件付確率をS=S1のとき第8表
から第10表に、S=S2のとき第11表から第13表に
示した。これらの表においてP(e1|Sj)、P(e2
|Sj、e1)、P(e3|Sj、e1、e2)(j=1、2)は
下記の意味を有する。 P(e1|Sj):参照画像信号SがSjのとき第1ビツ
トの予測誤差信号がe1である確率。 P(e2|Sj、e1):参照画像信号SがSjでかつ第1
ビツトの予測誤差信号がe1のとき第2ビツトの
予測誤差信号がe2である確率。 P(e3|Sj、e1、e2):参照画像信号SがSjでかつ
第1ビツトの予測誤差信号がe1、第2ビツトの
予測誤差信号がe2のとき第3ビツトの予測誤差
信号がe3である確率。 上記確率は第3表、第6表のP(αi|S1)、P
(αi|S2)から次のようにして計算される。 第7図a,b,cにこのように計算された条件
付確率をS=S2の場合について図示した。第6図
を用いてP(e1|S2)、P(e2|S2、e1)、P(e3
S1、e1、e2)を直観的に説明しよう。 P(e1|S2):P(0|S2)はS=S2のときxがα1
α2、α3、α4のどれかになる確率。すなわち第6
図aにおいて全体に対して斜線部の占める割
合。 P(1|S2)はS=S2のときxがα5、α6、α7
α8のどれかになる確率。すなわち第7図aにお
いて全体に対して空白部の占める割合。 P(e2|S2、e1):P(0|S2、0)はS=S2であ
りかつxがα1、α2、α3、α4のどれかであるとき
xがα1、α2のどちらかになる確率。すなわち第
7図aの点線を境にした左半分で斜線部の占め
る割合。 P(1|S2、0)は同じ条件のときxがα3、α4
のどちらかになる確率。すなわち同一の部分で
空白部の占める割合。 P(0|S2、1)はS=S2でありかつxがα5
α6、α7、α8のどれかであるときxがα5、α6のど
ちらかになる確率。すなわち第6図aの点線を
境にした右半分で斜線部の占める割合。 P(1|S2、1)は同じ条件のときxがα7、α8
のどちらかになる確率。すなわち同一の部分で
空白部の占める割合 P(e3|S2、e1、e2):P(0|S2、0、0)はS
=S2でありxがα1、α2のどれかであるときxが
α1になる確率。すなわち第6図cでα1とα2から
なる部分で斜線部の占める割合。 P(1|S2、0、0)は同じ条件のときxがα2
になる確率。すなわち同一の部分で空白部の占
める割合。 P(0|S2、0、1)、P(0|S2、1、0)、P
(0|S2、1、1)はそれぞれ第6図Cで、α3
とα4、α5とα6、α7とα8からなる部分で斜線部の
占める割合、 P(1|S2、0、1)、P(1|S2、1、0)、P
(1|S2、1、1)は、それぞれの部分で空白
部の占める割合。 モード信号Miは以上詳しく説明してきた条件
付確率P(e1|S)、P(e2|S、e1)、P(e3|S、
e1、e2)を用いて次のように定められる。 Mi:P(0|S)が与えられた確率Pθと等しいか
より大きいととき0、小さいとき1 M2:P(0|S、e1)が与えられた確率Pθと等し
いかより大きいとき0、小さいとき1 M3:P(0|S、e1、e2)が与えられた確率Pθと
等しいかより大きいとき0、小さいとき1 第14表、第15表にS=S1、S2のときモード信号
Miの一覧表を掲げた。これらは第8表から第10
表、第11表から第13表の条件付確率に基づきPθ
=0.7を用いて作成されている。モード信号Mi
決定法には、条件付確率P(e1|S)、P(e2
S)、P(e3|S)を用いる方法もあるが、後でわ
かるように本方法によるほうが効率的な符号化を
実現できる。
[Table] Number e is equal to i-1. For example, S=S 1 , x=5
Then, as shown in Table 3, x matches α 2 =5, which has the second largest conditional probability P (α 2 | S 1 ) = 0.20, so as shown in Table 6, e = i x −1=
2-1=1=(0, 0, 1) is output from the selection circuit 9 as a prediction error signal. S=S j (j=1,
2), from Tables 2 and 5, each bit e i of e
The probability that (i = 1 to 3) is 0 or 1 is P(e i |
S j ) (i=1 to 3, j=1, 2) can be calculated as follows. P (e 1 = 0 | S j ) = 4i=1 P (α i | S j ) P (e 1 = 1 | S j ) = 1-P (e 1 = 0 | S j ) P (e 2 = 0 | S j ) = 2i=1 P (α i | S j ) + 6i=5 P (α i | S j ) P (e 2 = 1 | S j ) = 1-P( e 2 = 0 | S j ) P ( e 3 = 0 | S j ) = P ( α 1 | S j ) + P ( α 3 | S j ) + P ( α 5 | S j ) + P ( α 7 | S j ) P( e3 =1| Sj )=1-P( e3 =0| Sj ) Tables 4 and 7 show the calculation results. Fourth
In Table 7, the probability that each e i (i=1 to 3) becomes 0 is always higher than the probability that it becomes 1. e i (i=1
The reason why ~3) has such a property will be explained below using the case of S=S 2 as an example. Figure 6 a,
The probability P( α 1
|S 2 ) (i=1 to 8) is shown in a graph with α i on the horizontal axis. Graphs a, b, and c are all the same, but the diagonal lines are drawn differently. The meaning of the shaded portion will be explained later. In Fig. 5, the probability of occurrence of x when S = S 2 P(x|S 2 ) (X = 0 to 7) is graphed with x as the horizontal axis. x|
Figure 6 a, b, and c are obtained by rearranging S 2 ) in descending order of magnitude to the left. P(x|S 2 ) had a bimodal distribution, but P(α i |S 2 ) was rearranged from the left in descending order of magnitude, resulting in a downward-sloping distribution. As is clear from the method of creation, P(x|S)
In general, P(α i | S) no matter what type of distribution
is monotonically decreasing with respect to the index i of α i , and P(α i | S)
has a downward-sloping distribution. The explanation is given using the case of S=S 2 as an example, but the following explanation is based only on the fact that P(α i | S) has a downward-sloping distribution, so it holds true for the general case of S. do. Therefore, the shaded area (x=α 1 to α 4 , e=0 to 3 , corresponding to e 1 =0) in FIG.
~7, which corresponds to e 1 = 0), so e 1 = 0
The probability of e 1 =1 is higher than the probability of e 1 =1. Similarly, Figure 7b
The shaded part (x=α 1 , α 2 , α 5 , α 6 , e=0, 1,
4, 5 (corresponding to e 2 = 0) are blank parts (x =
α 3 , α 4 , α 7 , α 8 , e=2, 3, 6, 7 or e 2
= 1), so the probability of e 2 = 0 is e 2 = 1
higher than the probability of Furthermore, the shaded area in Figure 7d (x=
α 1 , α 3 , α 5 , α 7 , e=0, 2, 4, 6 or e 3
= 0) are blank parts (x = α 2 , α 4 , α 6 , α 8 , e
=1, 3, 5, 7, that is, e 3 =1), so the probability of e 3 =0 is higher than the probability of e 3 =1. The above shows that the probability that e i (i=1 to 3) is always 0 is higher than the probability that it is 1. The method of generating the error signals e 1 , e 2 , e 3 has been explained above, and next, the first, second, and third mode signals M 1 ,
Let's explain how M 2 and M 3 are generated. Until now, we have considered the probabilities regarding e 1 , e 2 , and e 3 based only on the reference image signal S, but from now on, we will consider e 1 in addition to S for e 2 , and S for e 3 . Besides e 1 ,
Let's renormalize and consider e 2 as a condition. These newly devised conditional probabilities are shown in Tables 8 to 10 when S=S 1 , and Tables 11 to 13 when S=S 2 . In these tables, P(e 1 | S j ), P(e 2
|S j , e 1 ) and P(e 3 |S j , e 1 , e 2 ) (j=1, 2) have the following meanings. P(e 1 |S j ): Probability that the prediction error signal of the first bit is e 1 when the reference image signal S is S j . P(e 2 | S j , e 1 ): Reference image signal S is S j and the first
The probability that the second bit's prediction error signal is e2 when the bit's prediction error signal is e1 . P(e 3 | S j , e 1 , e 2 ): When the reference image signal S is S j and the prediction error signal of the first bit is e 1 and the prediction error signal of the second bit is e 2 , the third bit The probability that the prediction error signal of is e 3 . The above probabilities are P(α i | S 1 ) and P in Tables 3 and 6.
It is calculated from (α i |S 2 ) as follows. The conditional probabilities calculated in this way are illustrated in FIGS. 7a, b, and c for the case of S=S 2 . Using Figure 6, P(e 1 | S 2 ), P(e 2 | S 2 , e 1 ), P(e 3 |
Let us intuitively explain S 1 , e 1 , e 2 ). P(e 1 | S 2 ): P(0 | S 2 ) is when S=S 2 and x is α 1 ,
Probability of being either α 2 , α 3 , or α 4 . That is, the sixth
In figure a, the percentage of the shaded area relative to the whole. P(1|S 2 ) is when S=S 2 and x is α 5 , α 6 , α 7 ,
Probability of being one of α8 . That is, the proportion of blank space to the whole in Fig. 7a. P(e 2 | S 2 , e 1 ): P(0 | S 2 , 0) is when S=S 2 and x is one of α 1 , α 2 , α 3 , α 4 Probability of either α 1 or α 2 . That is, the proportion occupied by the shaded area in the left half of the dotted line in Figure 7a. P(1|S 2 , 0) is the same condition when x is α 3 , α 4
Probability of either. In other words, the proportion of blank space in the same part. P(0|S 2 , 1) is S=S 2 and x is α 5 ,
Probability that x becomes either α 5 or α 6 when α 6 , α 7 , or α 8 . In other words, the proportion occupied by the shaded area in the right half of Figure 6a bordering on the dotted line. P(1|S 2 , 1) is the same condition when x is α 7 , α 8
Probability of either. In other words, the proportion of blank space in the same part P(e 3 | S 2 , e 1 , e 2 ): P (0 | S 2 , 0, 0) is S
= S 2 and the probability that x becomes α 1 when x is either α 1 or α 2 . That is, the proportion occupied by the shaded area in the part consisting of α 1 and α 2 in Figure 6c. P(1 | S 2 , 0, 0) is when x is α 2 under the same conditions
Probability of becoming . In other words, the proportion of blank space in the same part. P(0|S 2 , 0, 1), P(0|S 2 , 1, 0), P
(0 | S 2 , 1, 1) are respectively shown in Figure 6C, α 3
and the proportion occupied by the shaded area in the part consisting of α 4 , α 5 and α 6 , α 7 and α 8 , P (1 | S 2 , 0, 1), P (1 | S 2 , 1, 0), P
(1 | S 2 , 1, 1) is the proportion of blank space in each part. The mode signal M i has the conditional probabilities P(e 1 | S), P(e 2 | S, e 1 ), P(e 3 | S,
e 1 , e 2 ), it is determined as follows. M i : 0 if P(0|S) is equal to or greater than the given probability Pθ, 1 if smaller M 2 : P(0|S, e 1 ) is equal to or greater than the given probability Pθ 0 when P(0|S, e 1 , e 2 ) is equal to or greater than the given probability Pθ, 1 when smaller Tables 14 and 15 show that S=S 1 , mode signal when S 2
A list of M i was posted. These are Tables 8 to 10.
Pθ based on the conditional probabilities in Tables 11 to 13
=0.7. The method for determining the mode signal M i includes the conditional probabilities P(e 1 | S), P(e 2 |
There is also a method using P(e 3 |S), but as will be seen later, this method can achieve more efficient encoding.

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】 第3図の予測符号化回路2に戻つて説明を続け
よう。第3図で第1、2、3モード信号発生用
ROM15,16,17により第1、2、3モー
ド信号M1,M2,M3が作成されるが、これは以
上で詳しく説明した方法に基づいており、M1は、
ROM15により参照画像信号S=(a、b、c、
d)のみを用いて決定され、M2はROM16によ
り参照画像信号S=(a、b、c、d)及びe1
用いて決定され、M3はROM17により参照画像
信号S′=(a、b、c、d)及びe1、e2を用いて
決定される。P(e1|S)、P(e2|S)、P(e3
S)を用いてM1,M2,M3を決定することにす
れば、e1、e2はROM16,17において不要な
入力データとなり、予測符号化回路2はより簡単
な回路構成になるが後でわかるように符号化効率
は低下する。 以上8色で4画素参照の場合について説明して
きたが、一般にN(2n-1<N2n)色でm画素参
照の場合に拡張するのは容易である。このとき第
3図の予測符号化回路2で、ROM8はnビツト
の画素をm個アドレスデータとして入力し、nビ
ツトからなるαi(1iN)をN個データとし
て出力する。選択回路9はαi(1iN)とn
ビツトからなるxを入力し、高々n個の1ビツト
予測誤差信号eiを出力する。ここで高々n個とし
たのは次の理由による。たとえば7色画像信号で
xは0、1、……、6に対応する色を取り得ると
する。N=7ゆえn=3であり、α8は絶対にxと
して発生しない色に対応する。たとえばα8=7と
すれば、x=α8=7とはなりえないから、常にe
≠(1、1、1)である。よつてe1=e2=1のと
きe3は必ず0であり、このとき第3ビツトの予測
誤差信号e3を発生する必要はない。このようにN
≠2nのときには、常にnビツトの予測誤差信号を
発生する必要はない。また一般にN(2n-1<N
2n)値のときモード信号決定用ROMは各ei(i=
1〜n)に対応してn個設置されそれぞれモード
信号Mi(i=1〜n)を出力する。M1決定用
ROMはSのみを用いてM1を決定し、M1決定用
ROM(i=2〜n)はS及びe1〜ei-1を用いてMi
を決定する。 次に以上のようにして得られた予測誤差信号を
符号化する圧縮符号化回路について説明する。第
1図の予測符号化回路2すなわち具体的には第3
図に示された予測符号化回路2の出力e1、e2、e3
は第1図の圧縮符号化回路4に加えられる。圧縮
符号化回路4として1次元ランレングス符号化回
路を用いることにすれば、第8図のごとくe1
e2、e3をシリアルに接続して1次元信号列としラ
ンレングス符号化することがまず考えられる。第
8図でe1、e2、e3は発生順に左から右へと記され
ている。e1、e2、e3はすでに詳しく説明したよう
に常に0になる確率が1になる確率より高いので
これでもデータ圧縮が可能である。しかし、予測
誤差信号が0になる確率の高さを示すモード信号
を用いさらに効率のよい符号化を行なうこと(例
えば特開昭52−79610号公報、書画通信方式)が
できる。その特徴は、参照画像信号があるパター
ンのときは予測適中率は高く、あるパターンの場
合は低いということに注目し、予測誤差信号を参
照画像信号に基づき高い適中率のグループと低い
適中率のグループの二つにわけそれぞれのグルー
プにあつた符号化を行ないより高い圧縮率を実現
するものである。 ここで予測適中とは各ei(i=1〜3)が0に
なることと考えればこれを本発明に適用できる。
このとき第3図の予測符号化回路2は予測誤差信
号e1、e2、e3の他にそれらが上記2グループのど
ちらに属するかを示す第1、2、3モード信号
M1,M2,M3を出力する必要がある。第3図の
ROM15,16,17の出力データM1,M2
M3(各1ビツト)はこのモード信号であり、e1
e2、e3とともに符号化回路4に加えられる。 第3図で注意すべき点は、第2モード信号発生
用ROM16は参照画像信号の他にe1を、第3モ
ード信号発生用ROM17はe1とe2を用いている
ことである。これが本発明と従来の2値画像信号
符号化装置(例えば特開昭52−79610号公報、書
画通信方式)と本質的に異なる点である。もちろ
ん多値画像信号符号化装置においても従来の2値
画像信号符号化装置と同じように参照画像信号の
みを用いてすべてのモード信号を決定してもよい
が、後で説明するように符号化効率は低下する。
このようにモード信号を利用する場合、第1図の
圧縮符号化回路4は、Mi=0(i=1、2、3)
の予測誤差信号eiに対しては0である確率が高い
ことを考慮に入れ長い0ランに対しても比較的短
い符号を発生する。Mi=1の予測誤差信号eiに対
しては0である確率がそう高くないことを考慮に
入れ長い0ランに対して長い符号を発生する。モ
ード信号を利用しない場合には0である確率の高
いeiも逆にそれほど高くないeiも一緒に符号化さ
れるが、モード信号を利用すれば0である確率の
高いものと低いものを分離して効率よく圧縮符号
化できる。第9図に、モード信号を利用する場合
のe1、e2、e3の符号化順序の具体例を示す。第9
図には左から右へと各ei、Miが発生順に記されて
おり、実線で囲まれたeiはMi=0に対応するも
の、点線で囲まれたeiはMi=1に対応するもので
ある。矢印はeiの符号化順序を示す。第1の矢印
は実線で囲まれたeiを発生順に、同時に発生され
たeiの場合は番号の若い順にシリアルに接続して
符号化することを示し、第2の矢印は点線で囲ま
れたeiを同様の順にシリアルに接続して符号化す
ることを示す。 このように第2ビツトの予測誤差信号e2はe1
あとで、第3ビツトの予測誤差信号e3はe1、e2
あとで符号化することにすれば、e2の符号化には
Sのみならずe2に先立つて符号化ずみのe1を、e3
の符号化にはSのみならずe3に先立つて符号化ず
みのe1、e2を利用できる。それゆえe2が0になる
確率の高さを示すモード信号M2はSのみならず
e1を用いて決め、e3が0になる確率の高さを示す
モード信号M3はSのみならずe1、e2を用いて決
めた方が有利である。たとえばS=S1のときSの
みによつて各モード信号Miを定めたとすると第
16表を得る。これは第4表から境界の確率Pθ=
0.7として求めた。これとSのみならずe1、e2
利用してモード信号を定めた第14表とを比較すれ
ばわかるように、M1は双方ともSのみで定める
ので変りはないが、M2は第16表ではe1にかかわ
らず1であるのに対し、第14表ではe1が0のとき
は0、1のときは1でありより細かく場合わけし
正確に定められている。同様にM3は第16表では
e1、e2にかかわらず1であるのに対し、第17表で
はe1が0、e2が0のとき1、e1が0、e2が1のと
き0、e1が1、e2が0のとき1、e1が1、e2が1
のとき1でありより細かく場合わけし正確に定め
られている。各Miをより正確に定めた方が、ei
Miによるグループ分けがより効果的となり、よ
り高い符号化効率を与えるので、Sのみならずe1
あるいはe2をモード信号M2,M3の決定に用いる
べきであることがわかる。なおS=S2のときSの
みによつて各モード信号Miを定めた例を第17表
に示す。これは第7表から境界の確率Pθ=0.7.と
して求めた。S=S1の場合と同様第15表と第17表
を比較されたい。 第10図は圧縮符号化回路4の一実施例を示す
ブロツク図である。 この回路では第9図に示すごとくeiはMi=1に
対応するもの(点線で囲んだ)、Mi=0に対応す
るもの(実線で囲んだ)に分けて符号化される。
またこの回路では「予測当りのラン+予測誤り画
素」を1ケのランと定め、ラン長を「ei=0の長
さ」とし、そのラン長を符号化する。以上のよう
に符号化手順を定めると、一つのランは一般に三
種の誤差信号e1、e2、e3から構成されることに注
意されたい。第10図の回路は大まかに言えば上
下2つの部分からなり、上部Mi=1に対応するei
からなるランの符号化回路であり、一方下部は
Mi=0に対応するeiからなるランの符号化回路で
ある。第10図においてe1、e2、e3、M1,M2
M3はまず3ビツトレジスタ38,39にセツト
される。選択回路76,77ははじめe1、M1
それぞれ1個選択し、次にe2、M2をそれぞれ1
個選択し、最後にe3、M3をそれぞれ1個選択す
る。e1、e2、e3及びM1,M2,M3それぞれが1個
ずつ選択された後次のe1、e2e3及びM1,M2,M3
が3ビツトレジスタ38,39にセツトされ同様
の動作が繰り返される。eiはNOT回路78によ
り反転され、Mi=1(Hレベル)のときAND回
路81を介してカウンタ83に加えられ、Mi
0(Lレベル)のときNOT回路80により反転さ
れAND回路82を介してカウンタ87に加えら
れる。カウンタ83はAND回路81からの信号
がHレベルすなわちMi=1(Hレベル)、ei=0
(Lレベル)のときカウントアツプする。ラン終
了検出回路86はeiがHレベルになるとパルス信
号RCS1を出力しカウンタ83の内容をランレ
ングス符号発生器84にセツトした後カウンタ8
3をクリアする。ランレングス符号発生器84に
セツトされた値は、Mi=0に対応するeiが0であ
り続けた長さを示し、これは符号化すべきラン長
である。ランレングス符号発生器84はセツトさ
れた値に対応したランレングス符号RLC1を発生
し、RLC1発生終了後パルス信号RCE1を出力す
る。入力禁止回路57はRCS1信号でセツトされ
RCE1信号でリセツトされるフリツプフロツプで
その出力信号IHB1をOR回路52を通しレジス
タ38,39に加える。IHB1信号はランレング
ス符号発生器84が符号RLC1を出力中のときH
レベルの信号で、レジスタ38,39はHレベル
のINHBを受けるとその間ei、Miの入力を一時停
止する。Mi=0に対するeiに対しては、カウンタ
87、ランレングス符号発生器88、ラン終了検
出回路90、および入力禁止回路58が同様の動
作を行ない、Mi=1に対するeiのランを検出し、
そのラン長を符号化する。ランレングス符号発生
器88は84に比べて長いランに対して比較的短
い符号を発生し効率のよい符号化を行なう。ラン
レングス符号発生器84,88から発生するラン
レングス符号RLC0、RLC1の出力順序には注意
は要する。単純に各ランレングス符号をランレン
グス符号発生器84,88からの発生順に本符号
器から出力したならば復号器で復号不可能とな
る。復号できるようにするには、各ランの先頭に
位置する信号eiに注目し、その先頭信号を予測回
路から取り入れた順にすなわち各ランの発生順に
各ランのランレングス符号を発生する必要があ
る。第10図においてランレングス符号発生器8
4,88の右側に記された部分を中心とする回路
はこのランレングス符号の出力順序の制御を行
う。その動作を第11図のタイムチヤートを用い
て具体的に詳しく説明しよう。第11図において
最上段に記されているKはその下に記されている
予測誤差信号ei、モード信号Miが何番目に入力さ
れたかその順位を以下の説明の便利のために示
す。信号の入力は間欠的に行なわれるのでKは常
に一定時間ごとに更新されるわけではなく、ラン
レング符号発生器84,88がランレングス符号
発生中には更新されない。第11図におけるK以
外の信号は第10図の回路上に記されているが以
下各信号に説明を加える。ei、Miは選択回路7
6,77の出力信号であり、COU1、COU0はカ
ウンタ83,87の出力信号でそれぞれのカウン
ト値を示す。RCS1、RCS0はラン終了検出回路
86,90の出力でランの検出を示すパルス信号
である。RLC1、RLC0はランレングス符号発生
器84,88の出力符号であり、RCE1、RCE0
はランレングス符号発生器84,88から出力さ
れるランレングス符号RLC1、RLC0の発生終了
を示すパルス信号である。IHB1、IHB0は入力
禁止回路57,58の出力で、ランレングス符号
発生器84,88がランレングス符号発生中であ
ることを示す信号である。REDMはフリツプフ
ロツプ44の出力で符号メモリ43の内容を読み
出し中であることを示す信号である。INHBは
OR回路52の出力でこの信号がHレベルのとき
レジスタ38,39はe1、e2、e3、M1,M2,M3
の入力を一時停止する。SWCHはスイツチ信号
発生回路41の出力でこの信号がHレベルのとき
はRLC1、RLC0がスイツチ回路42を介してそ
れぞれ選択回路46、メモリ43に加えられこの
信号がLレベルのときは逆の接続となる。RLCE
は選択回路40の出力信号でSWCHがHレベル
のときRCE1と同じでありSWCHがLレベルのと
きRCE0と同じである。RLCDは本符号化回路の
出力信号である。REDMがHレベルのときラン
レングス符号メモリ43から読み出されたランレ
ングス符号が選択回路46によりRLCDとして選
択され、REDMがLレベルのときランレングス
符号発生器84あるいは88から発生されたラン
レングス符号がメモリ43を介さず直接選択回路
46によりRLCDとして選択される。 以上各信号の大まかな説明をしたが、第11図
のタイムチヤートに従つて各信号の具体的な変化
を追つて説明しよう。第11図においてK=5の
とき初めてei=1となり初めてランの終了が起
る。このときMi=0であるのでこのランはMi
0に対するものである。 そのラン長はカウンタ87にCOU0=2とカウ
ントされている。 K=5のときei=1、Mi=0ゆえAND回路9
4の出力はHレベルである。ラン終了検出回路9
0はこれを受けRCS0を発生し、カウンタ87の
内容COU0=2をランレングス符号発生器88に
セツトし、その直後カウンタ87をリセツトす
る。またRCS0は入力禁止回路58をセツトし
IHB0をHレベルに従つてINHBをHレベルにし、
レジスタ38,39が予測誤差信号e及びモード
信号Mを入力するのを一時禁止する。ランレング
ス符号発生器88はCOU0=2に対応したランレ
ングス符号RLC0=C2を発生しSWCHがHレベル
なのでスイツチ回路42を介してランレングス符
号メモリ43に書き込み、書き込み終了後RCE0
を発生し入力禁止回路58をリセツトする。ここ
で注意すべきことは初めて発生したランレングス
符号C2を直ちに本符号化回路の出力信号RLCD
として出力せずに一旦メモリ43に書き込んだこ
とである。これは既に述べた符号を復号可能にす
るための原則「ランの発生順にランレングス符号
を出力する」に基づいている。第11図の例で
は、K=1のときei=0、Mi=1でまず最初に
Mi=1に対するランが発生し、k=2のときei
0、Mi=1でこのランが継続し、k=3のときei
=0、Mi=0でMi=0に対するランが初めて発
生し、k=4のときei=0、Mi=0でこのランが
継続し、k=5のときei=1、Mi=0でMi=0
に対するランがラン長2で終了し符号C2が発生
されている。すなわちk=5の時点ではMi=1
に対するランは終了せずに継続中であり、Mi
0に対するランより早く発生したがそれに対する
ランレングス符号を発生するに至つてない。一方
Mi=0に対するランはMi=1に対するランより
遅く発生したがk=5おいて長さ2をもつて終了
したので先にランレングス符号C2が発生され
た。それゆえC2を発生終了後直ちにRLCDとし
て出力すると、先に発生したMi=0に対するラ
ンに先立つてその符号を出力することになり復号
不可能な符号系列となる。これを避けるためスイ
ツチ信号発生回路41は、カウンタ83,87が
クリアされCOU0=0、COU1=0となつている
初期状態においてモード信号Mi=1であるなら
ばMi=0のランに先立つてMi=1に対するラン
が発生したことを検出し、SWCHをHレベルに
セツトしスイツチ回路42をしてRLC1を選択回
路46へ、RLC0をメモリ43に接続させ、
RLC0はまずメモリ43に書き込まれるようにす
る。もし逆に初期状態においてMi=0であるな
らばMi=1に対するランに先立つてMi=0に対
するランが発生したことを検出し、SWCHをL
レベルにセツトしスイツチ回路42をしてRLC0
を選択回路46へ、RLC1をメモリ43に接続さ
せ、逆にRLC1がまずメモリ43に書き込まれる
ようにする。再びタイムチヤートの具体的な信号
変化を追つて行う。k=5でRLC0=C2が発生
されメモリ43に書き込まれたが、同様にしてk
=7、9でMi=0に対する長さ1、長さ0のラ
ンの終了が検出されそれに対応するランレングス
符号RLC0=C3,C4がメモリ43に書き込ま
れる。k=1から9までの間ではMi=1に対す
るeiはすべて0でありk=1のとき発生したMi
1に対するランは終了せずに継続している。k=
10に至り、ei=1、Mi=1となりMi=1に対す
るランの終了が初めて検出され、ラン終了検出回
路86から発生されたRCS1によりカウンタ83
の内容COU1=3がランレングス符号発生器84
にセツトされその直後にカウンタ83がリセツト
される。またRCS1は入力禁止回路57をセツト
しIHB1をHレベルに従つてINHBをHレベルと
しレジスタ38,39が予測誤差信号e1、e2
e3、モード信号M1,M2,M3を入力するのを一
時禁止する。ランレングス符号発生器84は
COU1=3に対応したランレングス符号RLC1=
C1を発生し、SWCHがHなのでRLC1はスイツ
チ回路42を介して、選択回路46へ接続され
REDMがLなので選択回路46はこれを選択し、
本符号化回路の出力符号RLCDとして出力する。
Mi=1に対応する符号C1はMi=0に対応する
符号C1,C2,C3より後で発生されたが、符
号C1に対するランはk=1のとき発生が開始さ
れており、符号C2,C3,C4に対応するラン
に先立つランである。それゆえ「ランの発生順に
ランレングス符号を出力する」の原則に基づきま
ず符号C1がRLCDとして出力された。ランレン
グス符号発生回路84は符号C1を発生終了後に
RCE1を出力し、選択回路40はSWCHがHレベ
ルであるのでRCE1を選択してRLCEとして出力
する。RLCEはフリツプフロツプ44をセツトし
REDMをHレベルとし、選択回路46はHレベ
ルのREDMを受けメモリ43を選択しその内容
C2,C3,C4を読み出し本符号化回路の出力
符号RLCDとして出力する。REDMがHレベル
の間INHBはHレベルとなり、e1、e2、e3、M1
M2,M3の入力は一時禁止される。メモリ43の
内容がすべて読み出され空になるとメモリ43が
MEMPを発生し、MEMPはフリツプフロツプ4
4をリセツトしREDMをLレベルにし、メモリ
43の読み出しを停止する。REDMがLレベル
になるとINHBはLレベルになりe1、e2、e3
M1,M2,M3の入力が再開される。 スイツチ信号発生回路41はMEMPをトリガ
信号として入力し、第18表のごとくCOU1、
COU0、Miに基づき新なSWCH信号を出力する。
第18表について詳しく説明しよう。MEMPが発
生するときSWCH信号が変化するが、そのタイ
ミングは第1にはRLC1をメモリ43を介さずに
直接RLCDとして出力した後メモリ43内の
RLC0を読み出してRLCDとして出力し終えた直
後であり、第2にはRLC0をメモリ43を介さず
に直接RLCDとして出力した後メモリ43内の
RLC1を読み出してRLCDとして出力し終えた直
後である。第1のときカウンタ83がRCS1によ
りクリアさ
[Table] Let us return to the predictive encoding circuit 2 in FIG. 3 and continue the explanation. Figure 3 shows 1st, 2nd, and 3rd mode signal generation.
The first, second and third mode signals M 1 , M 2 and M 3 are created by the ROMs 15, 16 and 17, which are based on the method explained in detail above, and M 1 is
The reference image signal S=(a, b, c,
d), M 2 is determined by the ROM 16 using the reference image signal S = (a, b, c, d) and e 1 , and M 3 is determined by the ROM 17 using the reference image signal S' = (a , b, c, d) and e 1 , e 2 . P(e 1 | S), P(e 2 | S), P(e 3 |
If we decide to determine M 1 , M 2 , M 3 using S), e 1 and e 2 will become unnecessary input data in the ROMs 16 and 17, and the predictive encoding circuit 2 will have a simpler circuit configuration. As we will see later, the encoding efficiency decreases. Although the case of 8 colors and 4 pixel reference has been described above, it is generally easy to extend this to the case of N (2 n -1 <N2 n ) colors and m pixel reference. At this time, in the predictive encoding circuit 2 of FIG. 3, the ROM 8 inputs m n-bit pixels as address data, and outputs α i (1iN) consisting of n bits as N data. The selection circuit 9 selects α i (1iN) and n
It inputs x consisting of bits and outputs at most n 1-bit prediction error signals e i . The reason why there are at most n pieces here is as follows. For example, assume that in a seven-color image signal, x can take on colors corresponding to 0, 1, . . . , 6. Since N=7, n=3, and α 8 corresponds to a color that never occurs as x. For example, if α 8 = 7, then x = α 8 = 7, so e
≠(1, 1, 1). Therefore, when e 1 =e 2 =1, e 3 is always 0, and there is no need to generate the third bit prediction error signal e 3 at this time. Like this N
When ≠2 n , it is not necessary to always generate an n-bit prediction error signal. In addition, in general N(2 n-1 <N
2 n ) value, the ROM for mode signal determination is each e i (i=
1 to n), and each outputs a mode signal M i (i=1 to n). For M 1 determination
ROM determines M 1 using only S, and for determining M 1
ROM (i=2 to n) is M i using S and e 1 to e i-1
Determine. Next, a compression encoding circuit that encodes the prediction error signal obtained as described above will be explained. Predictive encoding circuit 2 in FIG.
The outputs e 1 , e 2 , e 3 of the predictive encoding circuit 2 shown in the figure
is added to the compression encoding circuit 4 of FIG. If a one-dimensional run-length encoding circuit is used as the compression encoding circuit 4, e 1 , as shown in FIG.
The first idea is to serially connect e 2 and e 3 to form a one-dimensional signal sequence and perform run-length encoding. In FIG. 8, e 1 , e 2 , and e 3 are written from left to right in the order of occurrence. As already explained in detail, the probability that e 1 , e 2 , and e 3 will always be 0 is higher than the probability that they will be 1, so data compression is possible even in this case. However, more efficient encoding can be performed using a mode signal indicating a high probability that the prediction error signal becomes 0 (for example, Japanese Patent Laid-Open No. 79610/1983, calligraphic communication system). The feature is that the prediction accuracy is high when the reference image signal has a certain pattern and low when it is a certain pattern, and the prediction error signal is divided into a group with a high accuracy rate and a group with a low accuracy rate based on the reference image signal. This method divides the data into two groups and performs encoding appropriate for each group to achieve a higher compression rate. If we consider that the prediction accuracy means that each e i (i=1 to 3) becomes 0, this can be applied to the present invention.
At this time, in addition to the prediction error signals e 1 , e 2 , and e 3 , the predictive encoding circuit 2 in FIG.
It is necessary to output M 1 , M 2 , and M 3 . Figure 3
Output data of ROM15, 16, 17 M 1 , M 2 ,
M 3 (1 bit each) is this mode signal, e 1 ,
It is added to the encoding circuit 4 along with e 2 and e 3 . What should be noted in FIG. 3 is that the second mode signal generation ROM 16 uses e1 in addition to the reference image signal, and the third mode signal generation ROM 17 uses e1 and e2 . This is the essential difference between the present invention and conventional binary image signal encoding devices (for example, Japanese Patent Application Laid-open No. 79610/1983, calligraphic communication system). Of course, in the multilevel image signal encoding device, all mode signals may be determined using only the reference image signal as in the conventional binary image signal encoding device, but as will be explained later, the encoding Efficiency decreases.
When using the mode signal in this way, the compression encoding circuit 4 in FIG.
Considering that the prediction error signal e i has a high probability of being 0, a relatively short code is generated even for a long 0 run. For the prediction error signal e i with M i =1, a long code is generated for a long 0 run, taking into account that the probability of it being 0 is not so high. If a mode signal is not used, e i with a high probability of being 0 and e i with a low probability of being 0 are encoded together, but if a mode signal is used, those with a high probability of being 0 and those with a low probability of being 0 are encoded together. It can be separated and efficiently compressed and encoded. FIG. 9 shows a specific example of the coding order of e 1 , e 2 , and e 3 when using a mode signal. 9th
In the figure, each e i and M i are written from left to right in the order of occurrence, e i surrounded by a solid line corresponds to M i =0, and e i surrounded by a dotted line corresponds to M i = This corresponds to 1. The arrows indicate the encoding order of e i . The first arrow indicates that the e i 's surrounded by solid lines are serially connected and encoded in the order of their occurrence, and in the case of e i's that are generated at the same time, in ascending order of numbers, and the second arrow is surrounded by dotted lines. This shows that e i are serially connected in the same order and encoded. In this way, if we decide to encode the second bit prediction error signal e 2 after e 1 and the third bit prediction error signal e 3 after e 1 and e 2 , the encoding of e 2 is not only S but also encoded e 1 prior to e 2 , e 3
For encoding, not only S but also e 1 and e 2 encoded prior to e 3 can be used. Therefore, the mode signal M 2 indicating the high probability that e 2 becomes 0 is not only S but also
It is advantageous to determine the mode signal M 3 using e 1 and to indicate the high probability that e 3 becomes 0, using not only S but also e 1 and e 2 . For example, if S=S 1 and each mode signal M i is determined by S only, then
Get 16 tables. From Table 4, this is the boundary probability Pθ=
It was calculated as 0.7. As can be seen by comparing this with Table 14, which uses not only S but also e 1 and e 2 to determine the mode signal, there is no difference in M 1 since both are determined only by S, but M 2 In Table 16, it is 1 regardless of e 1 , whereas in Table 14, it is 0 when e 1 is 0, and 1 when it is 1, and it is determined more precisely by dividing the cases. Similarly, M 3 is in table 16
It is 1 regardless of e 1 and e 2 , but in Table 17, it is 1 when e 1 is 0 and e 2 is 0, 0 when e 1 is 0, e 2 is 1, e 1 is 1, 1 when e 2 is 0, e 1 is 1, e 2 is 1
The value is 1 when It is better to define each M i more precisely, so that e i
Since grouping by M i is more effective and gives higher coding efficiency, not only S but also e 1
Alternatively, it can be seen that e 2 should be used to determine the mode signals M 2 and M 3 . Table 17 shows an example in which each mode signal M i is determined only by S when S=S 2 . This was obtained from Table 7 using the boundary probability Pθ = 0.7. As in the case of S=S 1 , compare Tables 15 and 17. FIG. 10 is a block diagram showing one embodiment of the compression encoding circuit 4. In this circuit, as shown in FIG. 9, e i is coded separately into one corresponding to M i =1 (encircled by a dotted line) and one corresponding to M i =0 (enclosed by a solid line).
Further, in this circuit, "run per prediction + predicted error pixel" is defined as one run, the run length is set as "e i =0 length", and the run length is encoded. It should be noted that when the encoding procedure is determined as described above, one run generally consists of three types of error signals e 1 , e 2 , and e 3 . Roughly speaking, the circuit in Figure 10 consists of two parts, upper and lower, with e i corresponding to upper part M i =1.
is a run encoding circuit consisting of , while the bottom part is
This is a run encoding circuit consisting of e i corresponding to M i =0. In Fig. 10, e 1 , e 2 , e 3 , M 1 , M 2 ,
M3 is first set in 3-bit registers 38 and 39. The selection circuits 76 and 77 first select one each of e 1 and M 1 , and then select one each of e 2 and M 2 .
Finally, select one each of e 3 and M 3 . After e 1 , e 2 , e 3 and M 1 , M 2 , M 3 are selected one by one, the next e 1 , e 2 e 3 and M 1 , M 2 , M 3 are selected.
is set in the 3-bit registers 38 and 39, and the same operation is repeated. e i is inverted by the NOT circuit 78, and when M i =1 (H level), it is added to the counter 83 via the AND circuit 81, and M i =
When the signal is 0 (L level), it is inverted by the NOT circuit 80 and added to the counter 87 via the AND circuit 82. The counter 83 receives the signal from the AND circuit 81 at H level, that is, M i =1 (H level), e i =0
(L level), counts up. The run end detection circuit 86 outputs a pulse signal RCS1 when e i becomes H level, sets the contents of the counter 83 in the run length code generator 84, and then outputs the pulse signal RCS1.
Clear 3. The value set in the run length code generator 84 indicates the length for which e i corresponding to M i =0 remains 0, which is the run length to be encoded. The run-length code generator 84 generates a run-length code RLC1 corresponding to the set value, and outputs a pulse signal RCE1 after the generation of RLC1 is completed. The input inhibit circuit 57 is set by the RCS1 signal.
The flip-flop is reset by the RCE1 signal, and its output signal IHB1 is applied to registers 38 and 39 through an OR circuit 52. The IHB1 signal is high when the run-length code generator 84 is outputting the code RLC1.
When registers 38 and 39 receive INHB at H level, they temporarily stop inputting e i and M i during that time. For e i for M i =0, the counter 87, run length code generator 88, run end detection circuit 90, and input inhibit circuit 58 perform similar operations, and the run of e i for M i =1 is performed. detect,
Encode the run length. Run length code generator 88 generates relatively short codes for long runs compared to code 84 to provide efficient encoding. Care must be taken in the output order of the run-length codes RLC0 and RLC1 generated from the run-length code generators 84 and 88. If the run-length codes were simply output from the present encoder in the order in which they were generated from the run-length code generators 84 and 88, the decoder would be unable to decode them. To enable decoding, it is necessary to focus on the signal e i located at the beginning of each run, and generate the run-length code for each run in the order in which the leading signal is taken in from the prediction circuit, that is, in the order in which each run occurs. . In FIG. 10, the run-length code generator 8
The circuit centered on the part marked on the right side of 4.88 controls the output order of this run-length code. The operation will be specifically explained in detail using the time chart shown in FIG. In FIG. 11, K written at the top indicates the order in which the prediction error signal e i and mode signal M i written below are input for convenience of explanation below. Since the signal input is performed intermittently, K is not always updated at regular intervals, and is not updated while the run-length code generators 84 and 88 are generating run-length codes. The signals other than K in FIG. 11 are shown on the circuit of FIG. 10, but each signal will be explained below. e i and M i are selection circuits 7
COU1 and COU0 are the output signals of counters 83 and 87 and indicate the respective count values. RCS1 and RCS0 are pulse signals output from the run end detection circuits 86 and 90 and indicate run detection. RLC1 and RLC0 are the output codes of run-length code generators 84 and 88, and RCE1 and RCE0
is a pulse signal indicating the end of generation of run-length codes RLC1 and RLC0 output from run-length code generators 84 and 88. IHB1 and IHB0 are outputs of the input inhibiting circuits 57 and 58, and are signals indicating that the run-length code generators 84 and 88 are generating run-length codes. REDM is a signal output from the flip-flop 44 indicating that the contents of the code memory 43 are being read. INHB is
When this signal is at H level at the output of the OR circuit 52, the registers 38 and 39 are e 1 , e 2 , e 3 , M 1 , M 2 , M 3
Pause input. SWCH is the output of the switch signal generation circuit 41. When this signal is at H level, RLC1 and RLC0 are applied to the selection circuit 46 and memory 43, respectively, via the switch circuit 42, and when this signal is at L level, the connection is reversed. Become. RLCE
is the output signal of the selection circuit 40, which is the same as RCE1 when SWCH is at H level, and the same as RCE0 when SWCH is at L level. RLCD is the output signal of this encoding circuit. When REDM is at the H level, the run-length code read from the run-length code memory 43 is selected by the selection circuit 46 as the RLCD, and when REDM is at the L level, the run-length code generated from the run-length code generator 84 or 88 is selected. is directly selected as the RLCD by the selection circuit 46 without going through the memory 43. Although each signal has been roughly explained above, specific changes in each signal will be explained in accordance with the time chart of FIG. 11. In FIG. 11, when K=5, e i =1 and the end of the run occurs only when e i =1. At this time, M i =0, so this run is M i =
It is for 0. The run length is counted by the counter 87 as COU0=2. When K=5, e i =1, M i =0, so AND circuit 9
The output of No. 4 is at H level. Run end detection circuit 9
0 receives this and generates RCS0, sets the contents of the counter 87, COU0=2, in the run-length code generator 88, and immediately resets the counter 87. RCS0 also sets the input inhibit circuit 58.
Set INHB to H level according to IHB0 to H level,
The input of the prediction error signal e and the mode signal M to the registers 38 and 39 is temporarily prohibited. The run-length code generator 88 generates a run-length code RLC0=C2 corresponding to COU0=2, and since SWCH is at H level, it is written to the run-length code memory 43 via the switch circuit 42, and after the writing is completed, RCE0
is generated and the input inhibit circuit 58 is reset. What should be noted here is that the run length code C2 that occurs for the first time is immediately converted to the output signal RLCD of this encoding circuit.
This is because the data is temporarily written into the memory 43 without being output as a file. This is based on the already mentioned principle of ``outputting run-length codes in the order in which they occur'' in order to make codes decodable. In the example in Figure 11, when K=1, e i =0 and M i =1, first
A run for M i =1 occurs, and when k=2, e i =
0, M i =1, this run continues, and when k = 3, e i
When k=0, M i =0, a run for M i =0 occurs for the first time, when k=4, e i =0, and M i =0, this run continues, and when k=5, e i =1, M i =0 and M i =0
The run for is completed with run length 2 and code C2 is generated. That is, at the time of k=5, M i =1
The run for M i =
Although this occurs earlier than the run for 0, a run length code for it has not yet been generated. on the other hand
The run for M i =0 occurred later than the run for M i =1, but ended with length 2 at k=5, so run length code C2 was generated earlier. Therefore, if C2 is output as RLCD immediately after the generation ends, that code will be output before the run for M i =0 that occurred earlier, resulting in a code sequence that cannot be decoded. In order to avoid this, the switch signal generation circuit 41 operates so that if the mode signal M i =1 in the initial state where the counters 83 and 87 are cleared and COU0 = 0 and COU1 = 0, then the switch signal generating circuit 41 performs a run prior to the run of M i =0. detects that a run for M i =1 has occurred, sets SWCH to H level, and connects the switch circuit 42 to connect RLC1 to the selection circuit 46 and RLC0 to the memory 43,
RLC0 is first written to the memory 43. Conversely, if M i =0 in the initial state, it is detected that a run for M i =0 occurs before a run for M i =1, and SWCH is set to L.
Set the switch circuit 42 to RLC0 level.
is connected to the selection circuit 46 and RLC1 is connected to the memory 43, so that RLC1 is written to the memory 43 first. Again, follow the specific signal changes in the time chart. At k=5, RLC0=C2 was generated and written to the memory 43, but in the same way, RLC0=C2 was generated and written to memory 43.
=7,9, the end of the run of length 1 and length 0 for M i =0 is detected, and the corresponding run length codes RLC0 =C3, C4 are written in the memory 43. Between k=1 and 9, e i for M i =1 is all 0, and M i = 1 occurred when k=1.
The run for 1 continues without ending. k=
10, e i = 1, M i = 1, and the end of the run for M i = 1 is detected for the first time, and the counter 83 is detected by RCS1 generated from the run end detection circuit 86.
The content COU1=3 is the run length code generator 84
Immediately thereafter, the counter 83 is reset. Further, RCS1 sets the input inhibit circuit 57, sets IHB1 to H level, sets INHB to H level, and registers 38 and 39 output prediction error signals e 1 , e 2 ,
Temporarily prohibits input of e 3 and mode signals M 1 , M 2 , and M 3 . The run length code generator 84 is
Run length code RLC1= corresponding to COU1=3
Since SWCH is H, RLC1 is connected to the selection circuit 46 via the switch circuit 42.
Since REDM is L, the selection circuit 46 selects this,
It is output as the output code RLCD of this encoding circuit.
Code C1 corresponding to M i =1 was generated after codes C1, C2, and C3 corresponding to M i =0, but the run for code C1 started to be generated when k=1, and code C2 , C3, and C4. Therefore, based on the principle of "outputting run-length codes in the order of run occurrence," code C1 was first output as RLCD. After the run-length code generation circuit 84 finishes generating the code C1,
Since SWCH is at H level, the selection circuit 40 selects RCE1 and outputs it as RLCE. RLCE sets flip-flop 44
REDM is set to H level, and selection circuit 46 receives REDM at H level, selects memory 43, reads out the contents C2, C3, and C4, and outputs them as output code RLCD of the present encoding circuit. While REDM is at H level, INHB is at H level, and e 1 , e 2 , e 3 , M 1 ,
Input of M 2 and M 3 is temporarily prohibited. When all the contents of the memory 43 are read out and become empty, the memory 43 is
MEMP is generated and MEMP is flip-flop 4
4 is reset, REDM is set to L level, and reading from the memory 43 is stopped. When REDM goes to L level, INHB goes to L level and e 1 , e 2 , e 3 ,
Input of M 1 , M 2 , and M 3 is resumed. The switch signal generation circuit 41 inputs MEMP as a trigger signal, and as shown in Table 18, COU1,
Outputs a new SWCH signal based on COU0 and M i .
Let me explain Table 18 in detail. When MEMP occurs, the SWCH signal changes, but the timing is first to output RLC1 directly as RLCD without going through the memory 43, and then to output the signal in the memory 43.
Immediately after reading RLC0 and outputting it as RLCD, and secondly, after outputting RLC0 directly as RLCD without going through the memory 43,
This is right after reading RLC1 and outputting it as RLCD. In the first case, counter 83 is cleared by RCS1.

【表】 れてCOU1=0であり、第2のときカウンタ87
がRCS0によりクリアされてCOU0=0であり、
いずれにしてもMEMP発生時にはCOU1、COU0
のどちらか一方は0である。COU1=COU0=0
のときには、カウンタ83,87で計数中のラン
はないので、Miに基づき先にRLCDとして出力
すべきランレングス符号を定める。すなわちMi
=0ならばSWCHをLレベルにしてRLC0を先
に、Mi=1ならばSWCHをHレベルにしてRLC1
を先に出力するようスイツチ回路42を設定す
る。後回しにされたランレングス符号はメモリ4
3に一旦書き込まれ、先に出力すべき符号が
RLCDとして出力された後読み出されRLCDとし
て出力されることになる。COU1=0、COU0≠
0のときはカウンタ87がMi=0に対するラン
を計数中なので、この計数中のランに対応する符
号をまず先にRLCDとして出力する必要がある。
それゆえSWCHをLレベルにしてRLC0を先に出
力するようスイツチ回路42を設定する。RLC1
はメモリ43に一旦書き込まれ、RLC0がメモリ
を介さずにRLCDとして出力された後、メモリ4
3から読み出されRLCDとして出力されることに
なる。COU1≠0、COU0=0のときはカウンタ
83がMi=1に対するランを計数中なので、こ
の計数中のランに対応する符号をまず先にRLCD
として出力する必要がある。それゆえSWCHを
HレベルにしてRLC1を先に出力するようスイツ
チ回路42を設定する。RLC0は一旦メモリ43
に書き込まれ、RLC1がメモリを介さずRLCDと
して出力された後、メモリ43から読み出された
RLCDとして出力されることになる。以上が第18
表の説明である。 k=11においてMEMPが発生するがCOU0=
COU1=0、Mi=0なので第18表に従いSWCH
はLレベルになる。k=11においてei=1なので
Mi=0に対するランが発生と同時にラン長0で
終了し、RLC0としてランレングス符号C5が発
生されSWCHがLレベルなのでメモリ43を介
さずスイツチ回路42、選択回路46を通つて
RLCDとして出力される。ランレングス符号C5
の出力が終了するとランレングス符号発生器88
にRCE0を発生し、選択回路40はRCE0を受け
SWCHがLレベルなのでこれをRLCEとして出力
する。フリツプフロツプ44はRLCEによりセツ
トされHレベルのREDMを出力する。選択回路
46はHレベルのREDMを受けメモリ43を選
択しその内容を読み出そうとするがメモリ43に
は何も書かれてないので直ちにMEMPが出力さ
れる。フリツプフロツプ44はMEPMによりセ
ツトされREDMはLレベルになる。選択回路4
6はLレベルのREDMを受けメモリ43の読み
出しを停止し、スイツチ回路42の出力を選択す
る。レジスタ38,39はREDMがLになると
INHBがLになるのでe1、e2、e3、M1,M2,M3
の入力を再開する。 結局REDMがHレベルになるのは一瞬のこと
でありタイムチヤートには特に記してない。k=
12においてスイツチ信号発生回路41は前記の
MEMPを受け、COU1=COU0=0、Mi=1に
基づき(第18表参照)HレベルのSWCHを出力
する。k=12においてei=1なのでMi=1に対す
るランが発生と同時にラン長0で終了し、RLC1
としてランレングス符号C6が発生されSWCH
がHレベルなのでメモリ43を介さずスイツチ回
路42、選択回路46を通つてRLCDとして出力
される。ランレングス符号C6の出力が終了する
とランレングス符号発生器84はRCE1を発生
し、選択回路40はRCE1を受けSWCHがHレベ
ルなのでこれをRLCEとして出力する。フリツプ
フロツプ44はRLCEによりセツトされHレベル
のREDMを出力する。 選択回路46はHレベルのREDMを受けメモ
リ43を読み出そうとするがメモリ43には何も
書かれてないので直ちにMEMPが出力される。
フリツプフロツプ44はMEMPによりリセツト
されREDMはLレベルになる。選択回路46は
LレベルのREDMを受けメモリ43の読み出し
を停止し、スイツチ回路42の出力を選択する。
レジスタ38,39はREDMがLになると
INHBがLになるので、e1、e2、e3、M1,M2
M3の入力を再開する。結局REDMがHレベルに
なるのは一瞬のことであり、タイムチヤートには
特に記してない。k=13において、スイツチ信号
発生回路41はMEMPを受け、COU1=COU0=
0、Mi=1に基づき(第18表参照)Hレベルの
SWCHを出力する。k=13、14、15においてはei
=0なのでランレングス符号は発生されないがk
=16においてはei=1、Mi=0、COU0=1ゆえ
Mi=0に対するラン長1のランレングス符号C
8がRLC0として発生され、SWCHがHレベルな
のでRLC0はスイツチ回路42を介して一旦メモ
リ43に書き込まれる。ランレングス符号C8の
発生が終了するとランレングス符号器88は
RCE0を発生し、選択回路40はRCE0を受ける
がSWCHがLレベルなのでこれを選択せず、
RLCEは出力されない。k=17においてはei=0
なのでランレングス符号は発生されないがk=18
においてはei=1、Mi=1、COU1=2ゆえMi
1に対するラン長2のランレングス符号C7が
RLC1として発生され、SWCHがHレベルなので
RLC1はメモリ43を介さずスイツチ回路42、
選択回路46を通つてRLCDとして出力される。
ランレングス符号C7の出力が終了するとランレ
ングス符号発生器84はRCE1を発生し、選択回
路40はRCE1を受けSWCHがHレベルなのでこ
れをRLCEとして出力する。フリツプフロツプ4
4はRLCEによりセツトされHレベルのREDMを
出力する。選択回路46はHレベルのREDMを
受けメモリ43を選択しその内容C8を読み出し
本符号化回路の出力符号RLCDとして出力する。
メモリ43の内容すべて読み出され空になるとメ
モリ43がMEMPを発生し、MEMPはフリツプ
フロツプ44リセツトし、REDMをLレベルに
しメモリ43の読み出しを停止する。k=19にお
いてスイツチ信号発生回路41はMEMPを受け、
COU1=0、COU0=1に基づき(第18表参照)
LレベルのSWCHを出力する。これはk=17に
発生したMi=0に対するランがランレングカウ
ンタ87で計数中なので、この計数中のランに対
応する符号を先にRLCDとして出力するための処
置である。k=19、20、21においてはei=0、Mi
=1なのでランレングス符号は発生されずカウン
タ83がカウントアツプされる。k=21において
ei=0、Mi=1、COU1=2、COU0=1の状態
で第11図のタイムチヤートは終了しているが、
そのときMi=0およびMi=1の両方に対しカウ
ンタ83,87はラン長を計数中であり実際の動
作はさらに続くが第11図には示してない。以上
で本発明の符号化装置の説明を終了する。 次にこれと対になる復号化装置の説明を補足し
ておこう。 第12図は本発明の符号化装置と対になる復号
化装置のブロツク図を示すものである。第12図
で伸長復号化回路18は予測誤差符号化信号45
を入力し伸長復号化として予測誤差信号47とし
て出力し、予測復号化回路19は予測誤差信号4
7を入力し、予測復号化して復号化画像信号48
として出力する。なお予測誤差符号化信号45は
すでに詳しく説明した本発明の符号装置によつて
発生されたものとする。制御回路20はクロツク
信号、制御信号、同期信号を送出し各回路を制御
する。 第13図は8色(0〜7)のカラー画像信号
(1画素当り3ビツト)に対する予測復号化回路
19の一実施例を示すブロツク図である。説明を
簡単にするため本例では予測に用いられた画像信
号Sは第2図の4画素a、b、c、dからなると
する。また各画素を3ビツトで表現し各色は第1
表のごとく(0、0、0)、(0、0、1)、……、
(1、1、1)に対応するとする。もちろん本例
を拡張してもつと多数の画素からなるSおよびさ
らに多くのレベル数を有するカラー画像信号に対
する回路を構成するのは容易である。 予測復号化回路19においては第13図に示す
ごとくすでに復号化ずみの画像信号が3(l+2)
ビツトのシフトレジスタ28にセツトされてい
る。ここでlは1主走査線当りの画素数を表わ
す。第1モード信号決定ROM23は、a、b、
c、d4画素(各画素3ビツト)をアドレスデー
タとして入力し、それに基づきモード信号M1(1
ビツト)を出力する。モード信号M1は選択回路
27により選択されモード信号Miとして予測誤
差信号復号化回路18に送られる。伸長復号化回
路18はM1を受け、M1に対応した予測誤差信号
e1を伸長復号化し予測復号化回路19に加える。
伸長復号化回路18は入力したモード信号Mi
対応した予測誤差信号ei47を圧縮符号から伸長
復号化し、予測復号化回路19に加える。予測復
号化回路19において予測誤差信号ei47はすで
に復号化ずみの参照画像信号a、b、c、d(各
3ビツト)と供に第2モード信号発生ROM24
ヘアドレスデータとして加えられる。ROM24
は、このアドレスデータに基づき第2モード信号
M2を発生し選択回路27へ加える。選択回路2
7はM2を選択してモード信号Miとして伸長復号
化回路18に送られる。 伸長復号化回路18はM2を受け、M2に対応し
た予測誤差信号e2をeiとして予測復号化回路19
に加える。予測復号化回路19において予測誤差
信号e247はROM25へ加えられ、今までROM
24に加えられていたモード信号M1に対応する
予測誤差信号e1は1ビツトレジスタ21へセツト
される。 M1,M2に対応する予測誤差信号e1、e2は、す
でに復号化ずみの画像信号a、b、c、dと供に
第3モード信号発生ROM25へアドレスデータ
として加えられる。ROM25は、このアドレス
データに基づき第3モード信号M3を発生し、選
択回路27へ加える。選択回路27はM3を選択
してモード信号Miとして伸長復号化回路18に
送られる。 伸長復号回路18はM3を受け、M3に対応した
予測誤差信号e3をeiとして予測復号化回路19に
加える。予測復号化回路19において予測誤差信
号e347は色信号選択回路50へ制御信号として
加えられ、今までROM25へ加えられていたモ
ード信号M2に対応する予測誤差信号e2はレジス
タ21へセツトされ、レジスタ21にセツトされ
ていたモード信号M1に対応する予測誤差信号e1
はレジスタ22へセツトされる。そしてレジスタ
21,22の内容e1、e2はe3と同様にレベル信号
選択回路50へ制御信号として加えられる。結局
モード信号M1,M2,M3に対応する予測誤差信
号e1、e2、e3が色信号選択回路50へ制御信号e
=(e1、e2、e3)として加えられる。順位決定
ROM26は復号化ずみ画像信号a、b、c、d
をアドレスデータとして入力し、順位付けされた
色信号α1、α2、……、α8(各3ビツト)8個を出
力し、レベル信号選択回路50へ入力データとし
て加える。色信号選択回路50は、α1、α2……、
α8の中から制御信号e(3ビツト)へ1加えた数
e+1と一致する添字iを有するαiすなわちαe+1
を選択し復号化画像信号xとしてレジスタ28へ
セツトする。ここで、eはe1をMSB、e3をLSB
とする2進数と考えた。レジスタ28はxを入力
すると1画素だけ格納データをシフトし次の画素
の復号化動作に対し準備する。予測復号化回路1
9の第1、第2、第3モード信号発生用ROM2
3,24,25、順位決定ROM26は予測符号
化回路2の第1、第2、第3モード信号発生用
ROM15,16,17、順位決定ROM9と全
く同じである。 第14図は伸長復号化回路18の一実施例を示
すブロツク図である。予測誤差復号化回路18
は、図に示すように大きくわけて上下2つの部分
からなる。上部はMi=1に対応する予測誤差符
号化信号に対する復号化回路であり、下部はMi
=0に対応する予測誤差符号化信号に対する復号
化回路である。伸長復号化回路18の役割りはモ
ード信号Miを予測復号化回路19から受けとり
それに対応する予測誤差信号eiを予測復号化回路
19へ出力するにあたり、Mi=0なるモード信
号を受けとると上部の回路が動作し、Mi=1な
るモード信号を受けとると下部の回路が動作す
る。 バツフアメモリ29には予測誤差符号化信号
RCLD45がランレングス符号化されて蓄積され
ており、それはMi=1のときにはランレングス
復号化回路31より要求があると読み出され、
Mi=0のときにはランレングス復号化回路23
より要求があると読み出される。ランレングス復
号化回路31はMi=1に対する予測誤差符号化
信号RLC1を復号化する回路で、復号化スタート
信号RDS1を復号化スタート信号発生回路33よ
り受けとり動作を開始する。ランレングス復号化
回路31は動作を開始すると、スイツチ回路30
を介して予測誤差符号化信号RLC1をバツフアメ
モリ29から読み出し復号化して得られたランレ
ングス長をカウンタ35へセツトし、復号化終了
信号RDE1を出力する。カウンタ35はカウント
ダウンイネイブル信号ENB1がHのときカウント
ダウンし内容CON1が0になると予測誤差信号発
生回路37の出力をHレベル(‘1')とする。カ
ウンタ35はさらにカウントダウンし内容CON1
が−1になると復号化スタート信号発生回路33
がパルス信号RDS1を発生し再びランレングス復
号化回路の動作を開始させる。フリツプフロツプ
67は復号化スタート信号RDS1をOR回路65
を介して入力してセツトされ、復号化終了信号
RDE1をOR回路66を介して入力してリセツト
される。このときフリツプフロツプ67の出力
DECDはランレングス復号化回路31が復号化動
作中であることを示す。デイレイ回路68は
DECD信号を1クロツクデイレイさせて出力す
る。デイレイ回路68の出力はNOT回路68に
より反転されカウントダウンイネイブル信号
ENBとしAND回路61,62に加える。ENB、
MiがHレベル(‘1')のときENB1がHレベルと
なりカウンタ35がカウントダウンする。ENB
がHレベルMiがLレベル(‘0')のときENB0が
Hレベルとなりカウンタ36がカウントダウンす
る。 第14図の下部の回路Mi=0に対する予測誤
差符号化信号RLC0の復号化を行なう。そして、
信号RDS0、RDE0、CON0、ENB0、ランレング
ス復号化回路32、カウンタ36、復号化スター
ト信号発生回路34、予測誤差信号発生回路60
は、Mi=1用の回路における、信号RDS1、
RDE1、CON1、ENB1、ランレングス復号化回
路31、カウンタ35、復号化スタート信号発生
回路33、予測誤差信号発生回路37と同様の働
きをする。 以下第15図のタイムチヤートに従つて第14
図の予測誤差復号化回路19の動作を説明する。
第15図において最上段に記されているkはその
下に記されているモード信号Miが何番目に入力
されたかその順位を示す。モード信号Miに対応
する予測誤差信号eiはk=2、4、5等のときの
ようにMiを入力後直ちに出力されるときもある
が、k=1、3、6等のときのようにしばらく待
ち時間をおいてから出力されるときもある。ei
の×印はそのei出力待ちの時間を示し、その間
に、ランレングス復号器31あるいは32が動作
し、入力されたMiに対応するeiのランレングス符
号が復号される。待ち時間なしでeiが出力される
ときはeiに対応するランレングス符号がすでに復
号されているときである。予測誤差復号化回路1
9は、k=1のときから動作を開始する動作開始
時には、ENBはHレベル、DECDはLレベルカ
ウンタ35,36の内容CON1、CON0は0にイ
ニシヤルセツトされる。動作開始時には、ENB
がHレベルゆえ、Mi=1のときはENB1がHレベ
ルになり、カウンタ35がカウントダウンされ、
Mi=0のときはENB0がHレベルになりカウンタ
36がカウントダウンされる。第15図で、k=
1のときMi=1ゆえカウンタ35がカウントダ
ウンされその内容CON1は−1になる。CON1が
−1ゆえ復号化スタート信号発生回路33は信号
RDS1を発生ランレングス復号化回路31の動作
をスタートさせる。 またRDS1はOR回路65を介してフリツプフ
ロツプ67をセツトし信号DECDをHレベルにす
る。ランレングス復号化回路31は動作を開始
し、スイツチ回路30を介してバツフアメモリか
らランレングス符号C1をRLC1として入力し復
号する。ランレングス復号化回路31はランレン
グス符号C1の復号を終了するとその結果をカウ
ンタ35にセツトし信号RDE1を発しOR回路6
6を介してフリツプフロツプ68をリセツトし信
号DECDをLレベルにし、復号化終了を知らせ
る。予測誤差信号発生回路37はC1の復号結果
‘3'がカウンタ35にセツトされたのを信号
CON1として受けとり信号ei(1)=0を発しこれを
選択回路64を介して予測誤差信号eiとして出力
する。 ランレングス復号化回路31が動作中DECD信
号はHレベルである。そしてENB信号はそれに
1クロツク遅れてLレベルであるから、ランレン
グス復号化回路31が動作を開始してから1クロ
ツク後からカウンタ35に復号化結果がセツトさ
れてそれに基づきeiが出力されるまですなわち次
のモード信号Miが入力されるまでカウンタ35
のカウントダウンが禁止される。なおクロツク信
号は第15図の最下段にCLKとして記されてお
り本伸長復号化回路はCLKに同期して動作する。
以上でk=1のときの説明を終了し次にk=2の
ときの説明に入る。第15図でk=2のときMi
=1、ENBがHレベルゆえ、ENB1がHレベル
であり、カウンタ35がカウントダウンされその
内容CON1は2になる。CON1は2ゆえ予測誤差
信号発生回路37は信号e1(1)=0を発しこれを選
択回路64を介して予測誤差信号eiとして出力す
る。k=1のときはモード信号Miの入力後ラン
レングス復号化回路31の動作中(第15図で3
クロツクの間)eiの出力待ちの時間があつたが、
k=2のときはランレングス復号化回路31ある
いは32で動作せずともカウンタ35にすでにセ
ツトされていた値から予測誤差信号eiが直ちに発
生でき待ち時間の必要はない。以上でk=2のと
きの説明を終了し、次にk=3のときの説明に入
る。k=3のときMi=0、ENBがHレベルゆえ、
ENC2がHレベルであり、カウンタ36がカウン
トダウンされその内容CON0は−1になる。
CON0が−1ゆえ復号化スタート信号発生回路3
4は信号RDS0を発し、ランレングス復号化回路
32の動作をスタートさせる。またRDS0はOR
回路65を介してフリツプフロツプ67をセツト
し信号DECDをHレベルにする。ランレングス復
号化回路32は動作を開始し、スイツチ回路30
を介してバツフアメモリからランレングス符号C
2をRLC0として入力し復号する。ランレングス
復号化回路32はランレングス符号C2の復号を
終了するとその結果をカウンタ36にセツトし信
号RDE0を発しOR回路66を介してフリツプフ
ロツプ68をリセツトし信号DECDをLレベルに
し復号終了を知らせる。予測誤差信号発生回路6
0はC2の復号結果‘2'がカウンタ36にセツト
されたのを信号CON0として受けとり信号ei(0)
=0を発しこれを選択回路64を介して予測誤差
信号eiとして出力する。ランレングス復号化回路
32が動作中DECD信号はHレベルである。そし
てENB信号はそれに1クロツク遅れてLレベル
であるからランレングス復号化回路32が動作を
開始してから1クロツク後からカウンタ36に復
号結果がセツトされそれに基づきeiが出力される
まですなわち次のモード信号Miが入力されるま
でカウンタ35のカウントダウンが禁止される。
以上でk=3のときの説明を終了する。k=4〜
21についても同様の動作が続けられ、ランレング
ス符号C3からC10が復号化され各モード信号
Miに対応する予測誤差信号eiが発生される。 本発明のカラー画像信号符号化装置において第
10図の圧縮符号化回路4の動作を第11図のタ
イムチヤートによつて説明し、そのときランレン
グス符号C1,C2,……,C8が発生されると
した。第14図の伸長復号化回路18の動作を第
15図のタイムチヤートによつて説明してきた
が、そのときバツフアメモリに蓄積されていたラ
ンレングス符号C1,C2,……,C8は第11
図のC1,C2,……,C8と全く同じとしてい
る。その結果第15図に示されたC1,C2,…
…,C8の復号結果eiは、第11図に示されたei
と全く同じであり、これは伸長復号化回路18が
正しく動作していることを示している。以上で伸
長復号化回路18の説明を終了し、また本発明の
符号化装置と対になるカラー画像信号復号化装置
の説明を終える。 なお、符号化装置及び復号化装置ともに8値画
像信号の場合について説明してきたが、N(2n-1
<N2n)値の画像信号の場合に拡張するのは容
易である。N(2n-1<N2n)値の場合には予測
誤差信号eはe1、e2、……、eo(各1ビツト)の
nビツトからなり、eiの接続方法及びランの定義
は8値の場合と同様である。 以上詳しく説明してきたように、本発明の符号
化装置によれば、ランレングス符号器を用いてカ
ラー画像信号の符号化、復号化を効率よく行なえ
る。
[Table] When COU1=0 and the second time, counter 87
is cleared by RCS0 and COU0=0,
In any case, when MEMP occurs, COU1 and COU0
Either one is 0. COU1=COU0=0
At this time, there is no run being counted by the counters 83 and 87, so the run length code to be output as RLCD is first determined based on M i . That is, M i
If = 0, set SWCH to L level and RLC0 first, if M i = 1, set SWCH to H level and RLC1
The switch circuit 42 is set to output first. The deferred run-length code is stored in memory 4.
Once written to 3, the code to be output first is
After being output as an RLCD, it is read out and output as an RLCD. COU1=0, COU0≠
When it is 0, the counter 87 is counting runs for M i =0, so it is necessary to first output the code corresponding to the run being counted as RLCD.
Therefore, the switch circuit 42 is set to set SWCH to L level and output RLC0 first. RLC1
is once written to the memory 43, and after RLC0 is output as RLCD without going through the memory, the memory 4
3 and output as RLCD. When COU1≠0 and COU0=0, the counter 83 is counting runs for M i =1, so first the code corresponding to the run being counted is RLCD.
It needs to be output as . Therefore, the switch circuit 42 is set to set SWCH to H level and output RLC1 first. RLC0 is once memory 43
, RLC1 is output as RLCD without going through memory, and then read from memory 43.
It will be output as RLCD. This is the 18th
This is an explanation of the table. MEMP occurs at k=11, but COU0=
Since COU1 = 0, M i = 0, SWCH according to Table 18
becomes L level. Since e i =1 at k=11,
The run for M i =0 ends at the same time as the run length is 0, run length code C5 is generated as RLC0, and SWCH is at L level, so the run is passed through the switch circuit 42 and the selection circuit 46 without going through the memory 43.
Output as RLCD. Run length code C5
When the output of the run-length code generator 88 is completed,
generates RCE0, and the selection circuit 40 receives RCE0.
Since SWCH is at L level, it is output as RLCE. Flip-flop 44 is set by RLCE and outputs REDM at H level. The selection circuit 46 receives the H level REDM and selects the memory 43 and attempts to read its contents, but since nothing is written in the memory 43, MEMP is immediately output. The flip-flop 44 is set by MEPM and REDM goes to L level. Selection circuit 4
6 stops reading from the memory 43 upon receiving the L level REDM, and selects the output of the switch circuit 42. Registers 38 and 39 are set when REDM goes low.
Since INHB becomes L, e 1 , e 2 , e 3 , M 1 , M 2 , M 3
Resume input. In the end, it is only a moment that REDM reaches H level, and there is no particular note on the time chart. k=
12, the switch signal generation circuit 41 is
Upon receiving MEMP, it outputs an H level SWCH based on COU1=COU0=0 and M i =1 (see Table 18). Since e i = 1 at k = 12, the run for M i = 1 ends with a run length of 0 as soon as it occurs, and RLC1
Run length code C6 is generated as SWCH
Since it is at H level, it is output as RLCD through the switch circuit 42 and the selection circuit 46 without going through the memory 43. When the output of the run-length code C6 is completed, the run-length code generator 84 generates RCE1, and the selection circuit 40 receives RCE1 and outputs it as RLCE since SWCH is at H level. Flip-flop 44 is set by RLCE and outputs REDM at H level. The selection circuit 46 receives the H level REDM and attempts to read the memory 43, but since nothing is written in the memory 43, MEMP is immediately output.
The flip-flop 44 is reset by MEMP and REDM becomes L level. The selection circuit 46 receives the L level REDM, stops reading from the memory 43, and selects the output of the switch circuit 42.
Registers 38 and 39 are set when REDM goes low.
Since INHB becomes L, e 1 , e 2 , e 3 , M 1 , M 2 ,
Resume inputting M3 . After all, REDM reaches H level in an instant, and there is no particular note on the time chart. At k=13, the switch signal generation circuit 41 receives MEMP, and COU1=COU0=
0, M i =1 (see Table 18)
Output SWCH. For k=13, 14, 15, e i
= 0, so no run-length code is generated, but k
= 16, e i = 1, M i = 0, COU0 = 1, so
Run length code C with run length 1 for M i =0
8 is generated as RLC0, and since SWCH is at H level, RLC0 is temporarily written into the memory 43 via the switch circuit 42. When the generation of the run-length code C8 is finished, the run-length encoder 88
RCE0 is generated, and the selection circuit 40 receives RCE0, but since SWCH is at L level, it is not selected.
RLCE is not output. For k=17, e i =0
Therefore, no run-length code is generated, but k = 18
In, e i = 1, M i = 1, COU1 = 2, so M i =
The run length code C7 with run length 2 for 1 is
It is generated as RLC1 and SWCH is at H level.
RLC1 is the switch circuit 42 without going through the memory 43,
It passes through the selection circuit 46 and is output as RLCD.
When the output of the run-length code C7 is completed, the run-length code generator 84 generates RCE1, and the selection circuit 40 receives RCE1 and outputs it as RLCE since SWCH is at H level. flipflop 4
4 is set by RLCE and outputs H level REDM. The selection circuit 46 receives the H level REDM, selects the memory 43, reads out its contents C8, and outputs it as the output code RLCD of the main encoding circuit.
When all the contents of the memory 43 are read out and become empty, the memory 43 generates MEMP, which resets the flip-flop 44, sets REDM to L level, and stops reading the memory 43. At k=19, the switch signal generation circuit 41 receives MEMP,
Based on COU1=0, COU0=1 (see Table 18)
Outputs L level SWCH. This is because the run length counter 87 is currently counting the run for M i =0 that occurred at k=17, so the code corresponding to the run that is being counted is first outputted as the RLCD. For k=19, 20, 21, e i =0, M i
Since =1, no run length code is generated and the counter 83 is counted up. At k=21
The time chart in Figure 11 ends with e i = 0, M i = 1, COU1 = 2, and COU0 = 1, but
The counters 83, 87 are then counting the run length for both M i =0 and M i =1, and the actual operation continues, but is not shown in FIG. This concludes the description of the encoding device of the present invention. Next, let me supplement the explanation of the decoding device that is paired with this. FIG. 12 shows a block diagram of a decoding device that is paired with the encoding device of the present invention. In FIG. 12, the decompression decoding circuit 18 outputs the prediction error encoded signal
is input and decompressed and output as a prediction error signal 47, and the prediction decoding circuit 19 outputs the prediction error signal 47.
7 and performs predictive decoding to generate a decoded image signal 48
Output as . It is assumed that the prediction error encoded signal 45 is generated by the encoding device of the present invention which has already been described in detail. The control circuit 20 sends out clock signals, control signals, and synchronization signals to control each circuit. FIG. 13 is a block diagram showing an embodiment of the predictive decoding circuit 19 for a color image signal of eight colors (0 to 7) (3 bits per pixel). To simplify the explanation, in this example, it is assumed that the image signal S used for prediction consists of the four pixels a, b, c, and d shown in FIG. Also, each pixel is represented by 3 bits, and each color is represented by the first
As shown in the table (0, 0, 0), (0, 0, 1),...
Suppose that it corresponds to (1, 1, 1). Of course, by expanding this example, it is easy to construct a circuit for S consisting of a large number of pixels and a color image signal having an even larger number of levels. In the predictive decoding circuit 19, as shown in FIG. 13, there are already 3 (l+2) decoded image signals.
It is set in the bit shift register 28. Here, l represents the number of pixels per main scanning line. The first mode signal determination ROM 23 includes a, b,
4 pixels c and d (3 bits for each pixel) are input as address data, and based on that, the mode signal M 1 (1
bits). Mode signal M 1 is selected by selection circuit 27 and sent to prediction error signal decoding circuit 18 as mode signal M i . The decompression decoding circuit 18 receives M1 and generates a prediction error signal corresponding to M1.
e 1 is decompressed and decoded and added to the predictive decoding circuit 19.
The expansion decoding circuit 18 expands and decodes the prediction error signal e i 47 corresponding to the input mode signal M i from the compressed code, and applies it to the prediction decoding circuit 19 . In the prediction decoding circuit 19, the prediction error signal e i 47 is sent to the second mode signal generation ROM 24 together with the already decoded reference image signals a, b, c, d (3 bits each).
Added as hair address data. ROM24
is the second mode signal based on this address data.
M2 is generated and applied to the selection circuit 27. Selection circuit 2
7 selects M 2 and sends it to the expansion decoding circuit 18 as a mode signal M i . The decompression decoding circuit 18 receives M 2 and uses the prediction error signal e 2 corresponding to M 2 as e i to generate the prediction decoding circuit 19.
Add to. In the prediction decoding circuit 19, the prediction error signal e 2 47 is added to the ROM 25, and until now the ROM
The prediction error signal e 1 corresponding to the mode signal M 1 applied to the 1-bit register 21 is set to the 1-bit register 21 . The prediction error signals e 1 and e 2 corresponding to M 1 and M 2 are added as address data to the third mode signal generation ROM 25 together with the already decoded image signals a, b, c, and d. The ROM 25 generates a third mode signal M 3 based on this address data and applies it to the selection circuit 27 . The selection circuit 27 selects M 3 and sends it to the expansion decoding circuit 18 as a mode signal M i . The expansion decoding circuit 18 receives M 3 and adds a prediction error signal e 3 corresponding to M 3 to the prediction decoding circuit 19 as e i . In the prediction decoding circuit 19, the prediction error signal e3 47 is applied to the color signal selection circuit 50 as a control signal, and the prediction error signal e2 corresponding to the mode signal M2 , which has been applied to the ROM 25, is set to the register 21. The prediction error signal e 1 corresponding to the mode signal M 1 which was set in the register 21
is set in register 22. The contents e 1 and e 2 of the registers 21 and 22 are applied as control signals to the level signal selection circuit 50 similarly to e 3 . In the end, the prediction error signals e 1 , e 2 , e 3 corresponding to the mode signals M 1 , M 2 , M 3 are sent to the color signal selection circuit 50 as a control signal e.
= (e 1 , e 2 , e 3 ). Ranking determination
The ROM 26 stores decoded image signals a, b, c, d.
is input as address data, and eight ranked color signals α 1 , α 2 , . . . , α 8 (3 bits each) are outputted and added to the level signal selection circuit 50 as input data. The color signal selection circuit 50 has α 1 , α 2 ...,
α i that has a subscript i that matches the number e+1 obtained by adding 1 to the control signal e (3 bits) from among α 8 , that is, α e+1
is selected and set in the register 28 as the decoded image signal x. Here, e is e 1 MSB and e 3 is LSB
I thought of it as a binary number. When the register 28 receives x, it shifts the stored data by one pixel and prepares for the decoding operation of the next pixel. Predictive decoding circuit 1
ROM 2 for generating 1st, 2nd, and 3rd mode signals of 9
3, 24, 25, the ranking determination ROM 26 is for generating the first, second, and third mode signals of the predictive encoding circuit 2.
The ROMs 15, 16, 17 and ranking determining ROM 9 are exactly the same. FIG. 14 is a block diagram showing one embodiment of the decompression/decoding circuit 18. Prediction error decoding circuit 18
As shown in the figure, it is roughly divided into two parts, upper and lower. The upper part is a decoding circuit for the prediction error encoded signal corresponding to M i =1, and the lower part is a decoding circuit for the prediction error encoded signal corresponding to M i =1 .
This is a decoding circuit for a prediction error encoded signal corresponding to =0. The role of the decompression decoding circuit 18 is to receive the mode signal M i from the predictive decoding circuit 19 and output the corresponding prediction error signal e i to the predictive decoding circuit 19. When it receives a mode signal where M i =0, The upper circuit operates, and upon receiving a mode signal of M i =1, the lower circuit operates. The buffer memory 29 contains a prediction error encoded signal.
The RCLD 45 is run-length encoded and stored, and when M i =1, it is read out by the run-length decoding circuit 31 upon request.
When M i =0, the run length decoding circuit 23
It will be read when there is a further request. The run-length decoding circuit 31 is a circuit that decodes the prediction error coded signal RLC1 for M i =1, and receives the decoding start signal RDS1 from the decoding start signal generation circuit 33 and starts its operation. When the run length decoding circuit 31 starts operating, the switch circuit 30
The prediction error coded signal RLC1 is read out from the buffer memory 29 via the buffer memory 29, the run length obtained by decoding is set in the counter 35, and a decoding end signal RDE1 is output. The counter 35 counts down when the countdown enable signal ENB1 is H, and when the content CON1 becomes 0, the output of the prediction error signal generation circuit 37 is set to H level ('1'). Counter 35 further counts down and contents CON1
When becomes -1, the decoding start signal generation circuit 33
generates a pulse signal RDS1 to start the operation of the run-length decoding circuit again. The flip-flop 67 outputs the decoding start signal RDS1 to the OR circuit 65.
is set by inputting through the decoding end signal
It is reset by inputting RDE1 through the OR circuit 66. At this time, the output of flip-flop 67
DECD indicates that the run length decoding circuit 31 is in decoding operation. The delay circuit 68 is
Outputs the DECD signal with a 1 clock delay. The output of the delay circuit 68 is inverted by the NOT circuit 68 and becomes a countdown enable signal.
ENB and add to AND circuits 61 and 62. ENB,
When M i is at H level ('1'), ENB1 becomes H level and counter 35 counts down. ENB
is at H level When M i is at L level ('0'), ENB0 goes to H level and the counter 36 counts down. The prediction error coded signal RLC0 for the circuit M i =0 in the lower part of FIG. 14 is decoded. and,
Signals RDS0, RDE0, CON0, ENB0, run length decoding circuit 32, counter 36, decoding start signal generation circuit 34, prediction error signal generation circuit 60
is the signal RDS1, in the circuit for M i =1,
It functions similarly to RDE1, CON1, ENB1, run length decoding circuit 31, counter 35, decoding start signal generation circuit 33, and prediction error signal generation circuit 37. 14 according to the time chart in Figure 15 below.
The operation of the prediction error decoding circuit 19 shown in the figure will be explained.
In FIG. 15, k written at the top indicates the order in which the mode signal M i written below is input. The prediction error signal e i corresponding to the mode signal M i is sometimes output immediately after inputting M i , such as when k = 2, 4, 5, etc., but when k = 1, 3, 6, etc. In some cases, the output is output after waiting for a while. The x mark in the e i column indicates the e i output waiting time, during which the run length decoder 31 or 32 operates and the run length code of e i corresponding to the input M i is decoded. When e i is output without waiting time, the run-length code corresponding to e i has already been decoded. Prediction error decoding circuit 1
9 starts the operation when k=1. At the start of the operation, ENB is at the H level and DECD is at the L level. The contents CON1 and CON0 of the counters 35 and 36 are initialized to 0. At the start of operation, ENB
Since M i =1, ENB1 becomes H level and the counter 35 counts down.
When M i =0, ENB0 becomes H level and the counter 36 counts down. In Figure 15, k=
When M i =1, the counter 35 counts down and its content CON1 becomes -1. Since CON1 is -1, the decoding start signal generation circuit 33 outputs a signal.
RDS1 is generated to start the operation of the run length decoding circuit 31. Further, RDS1 sets the flip-flop 67 via the OR circuit 65 and sets the signal DECD to H level. The run-length decoding circuit 31 starts operating, inputs the run-length code C1 as RLC1 from the buffer memory via the switch circuit 30, and decodes it. When the run-length decoding circuit 31 finishes decoding the run-length code C1, it sets the result in the counter 35 and issues a signal RDE1 to the OR circuit 6.
6, the flip-flop 68 is reset and the signal DECD is set to L level, thereby notifying the completion of decoding. The prediction error signal generation circuit 37 outputs a signal when the decoding result '3' of C1 is set in the counter 35.
A received signal e i (1)=0 is generated as CON1, and this is outputted via the selection circuit 64 as a prediction error signal e i . While the run-length decoding circuit 31 is operating, the DECD signal is at H level. Since the ENB signal is at the L level one clock later, the decoding result is set in the counter 35 one clock after the run-length decoding circuit 31 starts operating, and e i is output based on it. In other words, until the next mode signal M i is input, the counter 35
countdown is prohibited. Note that the clock signal is indicated as CLK at the bottom of FIG. 15, and this decompression/decoding circuit operates in synchronization with CLK.
This concludes the explanation when k=1, and then begins the explanation when k=2. In Fig. 15, when k=2, M i
=1, since ENB is at H level, ENB1 is at H level, the counter 35 counts down, and its content CON1 becomes 2. Since CON1 is 2, the prediction error signal generation circuit 37 generates a signal e 1 (1)=0 and outputs this via the selection circuit 64 as the prediction error signal e i . When k=1, the run length decoding circuit 31 is operating after inputting the mode signal M i (3 in FIG. 15).
(during the clock) There was some time waiting for the output of e i , but
When k=2, the prediction error signal e i can be generated immediately from the value already set in the counter 35 without operating the run-length decoding circuit 31 or 32, and there is no need for waiting time. This concludes the explanation for k=2, and then begins the explanation for k=3. When k=3, M i =0 and ENB is at H level, so
ENC2 is at H level, the counter 36 counts down and its content CON0 becomes -1.
Since CON0 is -1, decoding start signal generation circuit 3
4 issues the signal RDS0 and starts the operation of the run length decoding circuit 32. Also, RDS0 is OR
The flip-flop 67 is set via the circuit 65, and the signal DECD is set to H level. The run length decoding circuit 32 starts operating and the switch circuit 30
Run-length code C from buffer memory via
2 as RLC0 and decode it. When the run-length decoding circuit 32 finishes decoding the run-length code C2, it sets the result in the counter 36, generates the signal RDE0, resets the flip-flop 68 via the OR circuit 66, and sets the signal DECD to L level to notify the end of the decoding. Prediction error signal generation circuit 6
0 receives the decoding result '2' of C2 set in the counter 36 as the signal CON0 and sends the signal e i (0).
=0 and outputs it via the selection circuit 64 as the prediction error signal e i . While the run-length decoding circuit 32 is operating, the DECD signal is at H level. Since the ENB signal is at the L level one clock later, the decoding result is set in the counter 36 one clock after the run-length decoding circuit 32 starts operating, and the decoding result is set in the counter 36 based on it until e i is output. The countdown of the counter 35 is prohibited until the mode signal M i is input.
This concludes the explanation when k=3. k=4~
The same operation continues for 21, and run length codes C3 to C10 are decoded and each mode signal is
A prediction error signal e i corresponding to M i is generated. In the color image signal encoding device of the present invention, the operation of the compression encoding circuit 4 shown in FIG. 10 will be explained with reference to the time chart shown in FIG. That's what I said. The operation of the decompression decoding circuit 18 in FIG. 14 has been explained using the time chart in FIG. 15. At that time, the run-length codes C1, C2, .
They are exactly the same as C1, C2, . . . , C8 in the figure. As a result, C1, C2,... shown in FIG.
..., C8 decoding result e i is shown in FIG .
This shows that the decompression/decoding circuit 18 is operating correctly. This concludes the explanation of the decompression decoding circuit 18, and also the explanation of the color image signal decoding device that is paired with the encoding device of the present invention. Although we have explained the case where both the encoding device and the decoding device are 8-level image signals, N(2 n-1
It is easy to extend this to the case of image signals with values <N2 n ). In the case of N (2 n-1 < N2 n ), the prediction error signal e consists of n bits e 1 , e 2 , ..., e o (1 bit each), and depends on the connection method of e i and the run. The definition is the same as for 8 values. As described above in detail, according to the encoding device of the present invention, color image signals can be efficiently encoded and decoded using a run-length encoder.

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

第1図は本発明の符号化装置のブロツク図、第
2図は参照画素と被予測画素の位置関係を示す
図、第3図は本発明の符号化装置に用いられる予
測符号化回路の一実施例を示すブロツク図、第4
図、第5図、第6図、第7図は画像信号の条件付
発生確率の1例を示す図、第8図、第9図は予測
誤差信号の符号化順序を説明する図、第10図は
本発明の符号化装置の予測誤差符号化回路の1例
を示すブロツク図、第11図は第10図の予測誤
差符号化回路のタイムチヤート、第12図は本発
明の復号化装置のブロツク図、第13図は本発明
の復号化装置に用いられる予測復号化回路の一実
施例を示すブロツク図、第14図は本発明の復号
化装置の予測誤差復号化回路の一実施例を示すブ
ロツク図、第15図は第14図の予測誤差復号化
回路のタイムチヤートである。 図において1,48……カラー画像信号、2…
…予測符号化回路、3,47……予測誤差信号、
4……圧縮符号化回路、5,45……符号化予測
誤差信号、6,20……制御回路、7,28……
3(l+2)ビツトシフトレジスタ、8,26…
…順位決定用ROM、9……順位信号選択回路、
15,23……第1モード信号決定用ROM、1
6,24……第2モード信号決定用ROM、1
7,25……第3モード信号決定用ROM、18
……伸長復号化回路、19……予測復号化回路、
21,22……1ビツトレジスタ、27,40,
46,76,77……選択回路、31,32……
ランレングス復号化回路、29……バツフアメモ
リ、35,36,83,87……カウンタ、3
3,34……ランレングス復号化回路スタート信
号発生器、30,42……スイツチ回路、37,
60……予測誤差信号発生回路、38,39、…
…3ビツトレジスタ、41……スイツチ信号発生
回路、43……ランレングス符号メモリ、44,
57,58,67……フリツプフロツプ、50…
…色信号選択回路、52,65,66……OR回
路、61,62,81,82,93,94……
AND回路、63,69,78,79,80……
NOT回路、68……デイレイ回路、86,90
……ラン終了検出回路、84,88……ランレン
グス符号発生器。
FIG. 1 is a block diagram of the encoding device of the present invention, FIG. 2 is a diagram showing the positional relationship between a reference pixel and a predicted pixel, and FIG. 3 is a diagram of a predictive encoding circuit used in the encoding device of the present invention. Block diagram showing the embodiment, No. 4
Figures 5, 6, and 7 are diagrams showing examples of conditional occurrence probabilities of image signals; Figures 8 and 9 are diagrams explaining the coding order of prediction error signals; The figure is a block diagram showing an example of the prediction error encoding circuit of the encoding device of the present invention, FIG. 11 is a time chart of the prediction error encoding circuit of FIG. 10, and FIG. 12 is a block diagram of the prediction error encoding circuit of the encoding device of the present invention. FIG. 13 is a block diagram showing an embodiment of the predictive decoding circuit used in the decoding device of the present invention, and FIG. 14 is a block diagram showing an embodiment of the prediction error decoding circuit of the decoding device of the present invention. The block diagram shown in FIG. 15 is a time chart of the prediction error decoding circuit shown in FIG. In the figure, 1,48...color image signal, 2...
...Prediction encoding circuit, 3,47...Prediction error signal,
4... Compression encoding circuit, 5, 45... Encoded prediction error signal, 6, 20... Control circuit, 7, 28...
3(l+2) bit shift register, 8, 26...
...ROM for ranking determination, 9...ranking signal selection circuit,
15, 23...ROM for determining the first mode signal, 1
6, 24...ROM for determining second mode signal, 1
7, 25... ROM for determining third mode signal, 18
... decompression decoding circuit, 19... predictive decoding circuit,
21, 22...1 bit register, 27, 40,
46, 76, 77... selection circuit, 31, 32...
Run length decoding circuit, 29... Buffer memory, 35, 36, 83, 87... Counter, 3
3, 34... Run length decoding circuit start signal generator, 30, 42... Switch circuit, 37,
60...Prediction error signal generation circuit, 38, 39,...
...3-bit register, 41...Switch signal generation circuit, 43...Run length code memory, 44,
57, 58, 67...flipflop, 50...
...Color signal selection circuit, 52, 65, 66...OR circuit, 61, 62, 81, 82, 93, 94...
AND circuit, 63, 69, 78, 79, 80...
NOT circuit, 68...Delay circuit, 86, 90
. . . Run end detection circuit, 84, 88 . . . Run length code generator.

Claims (1)

【特許請求の範囲】[Claims] 1 すでに入力ずみのN(2n-1<N2n)色のカ
ラー画像信号Sに基づき次に入力される画像信号
xを予測するN個の信号値を予測適中率順に並べ
る手段と、前記画像信号xの実際の信号値が前記
並べられた信号値の何番目に一致するかその順位
を検出する手段と、前記順位に対応する高々n個
の予測誤差信号ei(1in)を発生して前記
画像信号xを予測符号化する手段と、前記各予測
誤差信号ei(1in)が0である確率の高さ
を示すモード信号Miを、i=1のときは前記カ
ラー画像信号Sのみに基づき発生し、2in
のときは前記カラー画像信号S及びi−1個の予
測誤差信号ej(1j1−1)に基づき発生す
る手段と、前記各予測誤差信号ei(1in)
をそれに対応する各モード信号Mi(iin)
に基づきグループ分けした後に圧縮符号化する手
段とを有することを特徴とするカラー画像信号符
号化装置。
1. Means for arranging N signal values for predicting the next input image signal x based on the already input color image signal S of N (2 n-1 <N2 n ) colors in order of prediction accuracy; means for detecting the order in which the actual signal value of the signal x coincides with the arranged signal values, and generating at most n prediction error signals e i (1in) corresponding to the order; means for predictively encoding the image signal x; and a mode signal M i indicating a high probability that each prediction error signal e i (1in) is 0; when i=1, only the color image signal S; Occurs based on 2in
When , means for generating based on the color image signal S and i-1 prediction error signals e j (1j1-1), and each prediction error signal e i (1in)
and each mode signal M i (iin) corresponding to it
1. A color image signal encoding device comprising means for compression encoding after grouping based on.
JP4430780A 1979-11-20 1980-04-04 Encoding device for color picture signal Granted JPS56141671A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP4430780A JPS56141671A (en) 1980-04-04 1980-04-04 Encoding device for color picture signal
US06/207,500 US4344086A (en) 1979-11-20 1980-11-17 Encoder for encoding a multilevel pel signal sequence with probability representative mode codes allotted to prediction error codes for each pel signal and a decoder therefor
CA000365014A CA1165861A (en) 1979-11-20 1980-11-19 Encoder-decoder system for multilevel picture elements to prediction error codes for each pel signal and a decoder therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4430780A JPS56141671A (en) 1980-04-04 1980-04-04 Encoding device for color picture signal

Publications (2)

Publication Number Publication Date
JPS56141671A JPS56141671A (en) 1981-11-05
JPS6326587B2 true JPS6326587B2 (en) 1988-05-30

Family

ID=12687829

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4430780A Granted JPS56141671A (en) 1979-11-20 1980-04-04 Encoding device for color picture signal

Country Status (1)

Country Link
JP (1) JPS56141671A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0349986U (en) * 1989-09-19 1991-05-15

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0349986U (en) * 1989-09-19 1991-05-15

Also Published As

Publication number Publication date
JPS56141671A (en) 1981-11-05

Similar Documents

Publication Publication Date Title
EP1318665B1 (en) Image processing apparatus and method, program, and storage medium
US7983500B2 (en) Encoding method, encoding apparatus, decoding method, and decoding apparatus
US4800441A (en) Binary data compression and expansion processing apparatus
EP0754393B1 (en) Video image colour encoding
JPS5831791B2 (en) Image information band compression transmission device
US4191974A (en) Facsimile encoding communication system
US4716471A (en) Data decoding apparatus
JPS6326587B2 (en)
JPS6326586B2 (en)
JPS6364949B2 (en)
WO2000018133A1 (en) Encoding device and method, and decoding device and method
JPS6364948B2 (en)
JPH1127540A (en) Image coding/decoding method and its system
JP2812064B2 (en) Image processing device
JPH0723238A (en) Image data compression and decompression device
JP2809161B2 (en) Predictive coding device
JP2615215B2 (en) Image data compression method
JPH0123034B2 (en)
JP3855376B2 (en) Image encoding device
JP2001217722A (en) Information encoding apparatus, information encoding method, and computer-readable storage medium
JPH0311883A (en) Decoding system for variable length code, and facsimile equipment and still picture transmission system
JPH09135357A (en) Decoder for color image signal
JP3862590B2 (en) Image processing apparatus and method, computer program, and computer-readable storage medium
JPH11272843A (en) Color image encoding apparatus and method, and color image decoding apparatus and method
JP5075136B2 (en) Decoding device and control method thereof