JPS6364949B2 - - Google Patents

Info

Publication number
JPS6364949B2
JPS6364949B2 JP54150349A JP15034979A JPS6364949B2 JP S6364949 B2 JPS6364949 B2 JP S6364949B2 JP 54150349 A JP54150349 A JP 54150349A JP 15034979 A JP15034979 A JP 15034979A JP S6364949 B2 JPS6364949 B2 JP S6364949B2
Authority
JP
Japan
Prior art keywords
signal
prediction error
circuit
run
decoding
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
JP54150349A
Other languages
Japanese (ja)
Other versions
JPS5673975A (en
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 filed Critical
Priority to JP15034979A priority Critical patent/JPS5673975A/en
Priority to US06/207,500 priority patent/US4344086A/en
Priority to CA000365014A priority patent/CA1165861A/en
Publication of JPS5673975A publication Critical patent/JPS5673975A/en
Publication of JPS6364949B2 publication Critical patent/JPS6364949B2/ja
Granted legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/93Run-length coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

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

本発明は、多値画像の伝送あるいは蓄積に要す
る情報量を符号化により大幅に削減する多値画像
信号符号化装置及びそれと対になる多値画像信号
復号化装置に関する。 多値画像信号の有効な符号化法として予測符号
化法がある。これはすでに入力ずみの画像信号S
(以下単にSあるいは参照画像信号と呼ぶ)によ
り現在入力中の画像信号を予測しその誤差信号g
=x^−x^(xはxの予測信号)を符号化するもので
ある。従来x^はSの線型結合による線型予測法が
多く用いられていた。たとえばSとして第1図の
a,b,c,d4画素を用いたとき線型予測法は、 x^=m1・a+m2・b+m3・c+m4・d とする。ここでm1,m2,m3,m4は係数で、そ
の大きさにより各画素のx^に対する相関の強さを
示す。また第1図において点線は画像の主走査線
を示し、これに沿つて画像は左から右へ走査さ
れ、右端に到達するとその下の主走査線の左端か
ら走査が続けられる。画像は走査順に画像信号に
光電変換され、符号化装置に加えられる。線型予
測法は簡単な構成であるため従来多く用いられて
いたが、よりいつそう効果的な予測をするには、
さらに参照画像信号のレベルを詳しく調べ、線型
にとらわれず非線型の予測をする必要がある。こ
のように考えると効率のよい予測法は各Sごとに
最適な予測信号x^を定めてメモリに書き込んでお
く方法である。これを以下予測法Aと呼ぶ。この
予測法Aによれば、Sの状態を詳しく調べてxを
定めるので、線型予測法より適中率は高くなる。 Sが第1図のa,b,c,d4画素からなり各
画素が8値レベル信号であるとき、予測法Aに基
づく予測符号化回路は第2図に示すごとくにな
る。第2図において多値画像信号は1画素当り3
ビツトで表現され、3(1+2)ビツトシフトレ
ジスタ10へ入力される。ここにlは1主走査線
当りの画素数である。すでに入力ずみの画素a,
b,c,d(1画素当り3ビツト)は予測用
ROM11へアドレスデータとして加えられ、
ROM11はそれに基づき入力中の画素xの予測
信号x^をデータとして出力する。排他的論理和回
路12,13,14はx(3ビツト)とx^(3ビツ
ト)の排他的論理和をとり、予測誤差信号g=
(g1,g2,g3)(3ビツト)を出力する。ここでg1
がMSB、g3がLSBである。g=x−x^とする方法
もあるが、gの正負を示す符号ビツトを必要とす
るのでここでは避けた。予測誤差信号gを符号化
する方法は種々あるが、白黒2値のフアクシミリ
画像信号の符号化に広く利用されている1次元ラ
ンレングス符号化法を利用することが考えられ
る。これは白画素が続く長さ(白ラン)、黒画素
が続く長さ(黒ラン)を符号化するものである
が、予測誤差信号に適用する場合には、予測当り
が続く長さ、予測はずれが続く長さを符号化する
と考え、第2図の例では予測誤差信号の各ビツト
g1,g2,g3それぞれを1次元ランレングス符号化
すればよい。1次元ランレングス符号化を用いれ
ば、すでにフアクシミリなどに設置された2値画
像信号用符号器を利用し、予測器のみ多値画像信
号用に切り変えて多値画像信号の符号化のできる
利点がある。各信号列gi(i=1〜3)において
0の個数が常に1より多ければ、1次元符号化で
効率のよいデータ圧縮を行なえる。しかし第2図
の予測符号化回路で発生したgi(i=1〜3)は
常にこのような性質があるとは限らない。具体例
を上げてこれを説明しよう。参照画像信号がSで
ある条件のもとで次に入力される画像信号がx
(0〜7)である確率すなわちxのSについての
条件付確率をP(x|S)で表わす。S=(a,
b,c,d)がS1(4,3,4,5)及びS2
(2,7,6,1)のときのP(x|S)を第1表
と第3表に示す。第1表のP(x|S1)、第3表の
P(x|S2)をグラフ化したのが第3図、第4図
である。S=S1のときP(x|S)は第3図のご
とくレベル4を中心に単峰性の分布を示すので、
x^=4とするのが適当である。S=S2のときP
(x|S)は第4図のごとくレベル2、レベル6
の2つの峰を持つ双峰性の分布となるのでx^は決
定しがたいが仮にそれらの中間をとつてx^=4と
しよう。g=(g1,g2,g3)はxとx^の排他的論理
和で定まるが、それを第1表、第3表においてP
(x|S)の下の欄に示した。第1表、第3表よ
りgi(i=1〜3)が0である確率が計算できる。
たとえばS=S2のときg1=0である確率P(g1
O|S2)は、第3表でg1=0であるところのP
(x|S2)の総和を求め P(g1=0|S2)=P(x=4|S2)+P(x=5|
S2)+P(x=6|S2) +P(x=7|S2)=0.05+0.1+0.25+0.1=0.
5 と求まる。g2=0、g3=0である確率も同様に対
応するP(x|S)の総和より求めることができ
る。gi(i=1〜3)が1で
The present invention relates to a multi-value image signal encoding device that significantly reduces the amount of information required for transmitting or storing a multi-value image through encoding, and a multi-value image signal decoding device paired therewith. Predictive encoding is an effective encoding method for multilevel image signals. This is the image signal S that has already been input.
(hereinafter simply referred to as S or reference image signal) predicts the currently input image signal and generates an error signal g.
=x^-x^ (x is the predicted signal of x). Conventionally, a linear prediction method based on a linear combination of S has often been used for x^. For example, when 4 pixels a, b, c, and d in FIG. 1 are used as S, the linear prediction method is x^=m 1 ·a+m 2 ·b+m 3 ·c+m 4 ·d. Here, m 1 , m 2 , m 3 , and m 4 are coefficients, and their magnitudes indicate the strength of the correlation of each pixel with x^. Further, in FIG. 1, 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. The images are photoelectrically converted into image signals in scanning order and applied to an encoding device. The linear prediction method has been widely used due to its simple structure, but in order to make more effective predictions, it is necessary to
Furthermore, it is necessary to examine the level of the reference image signal in detail and make non-linear predictions without being limited to linear ones. Considering this, an efficient prediction method is to determine the optimal prediction signal x^ for each S and write it into memory. This will be referred to as prediction method A hereinafter. According to this prediction method A, the state of S is examined in detail to determine x, so the accuracy is higher than that of the linear prediction method. When S consists of 4 pixels a, b, c, and d in FIG. 1, and each pixel is an 8-level signal, the predictive encoding circuit based on prediction method A is as shown in FIG. In Figure 2, the multivalued image signal is 3 per pixel.
It is expressed in bits and input to a 3 (1+2) bit shift register 10. Here, l is the number of pixels per main scanning line. Already input pixel a,
b, c, d (3 bits per pixel) are for prediction
Added to ROM11 as address data,
Based on this, the ROM 11 outputs the prediction signal x^ of the input pixel x as data. The exclusive OR circuits 12, 13, and 14 take the exclusive OR of x (3 bits) and x^ (3 bits), and obtain the prediction error signal g=
Outputs (g 1 , g 2 , g 3 ) (3 bits). here g 1
is the MSB and g3 is the LSB. There is also a method of setting g=x-x^, but this method is avoided here because it requires a sign bit to indicate the sign of g. Although there are various methods for encoding the prediction error signal g, one-dimensional run-length encoding method, which is widely used for encoding black-and-white binary facsimile image signals, may be used. This encodes the length of a white pixel (white run) and the length of a black pixel (black run), but when applied to a prediction error signal, it encodes the length of a prediction error signal and the length of a prediction. Considering that the length of the error continues to be encoded, in the example shown in Figure 2, each bit of the prediction error signal is encoded.
Each of g 1 , g 2 , and g 3 may be one-dimensional run-length encoded. The advantage of using one-dimensional run-length encoding is that you can encode multi-value image signals by using a binary image signal encoder already installed in a facsimile, etc., and switching only the predictor to use for multi-value image signals. There is. If the number of 0's in each signal sequence g i (i=1 to 3) is always greater than 1, efficient data compression can be performed by one-dimensional encoding. However, g i (i=1 to 3) generated in the predictive encoding circuit of FIG. 2 does not always have such a property. Let me explain this with a concrete example. Under the condition that the reference image signal is S, the next input image signal is x
(0 to 7), that is, the conditional probability of x with respect to S is expressed as P(x|S). S=(a,
b, c, d) are S 1 (4, 3, 4, 5) and S 2 =
P(x|S) when (2, 7, 6, 1) is shown in Tables 1 and 3. FIGS. 3 and 4 are graphs of P(x|S 1 ) in Table 1 and P(x|S 2 ) in Table 3. When S=S 1 , P(x|S) shows a unimodal distribution centered on level 4 as shown in Figure 3, so
It is appropriate to set x^=4. When S=S 2 , P
(x|S) is level 2 and level 6 as shown in Figure 4.
Since it is a bimodal distribution with two peaks, it is difficult to determine x^, but let's take the midpoint between them and set x^ = 4. g = (g 1 , g 2 , g 3 ) is determined by the exclusive OR of x and x^, but it is expressed as P in Tables 1 and 3.
It is shown in the column below (x|S). From Tables 1 and 3, the probability that g i (i=1 to 3) is 0 can be calculated.
For example, when S = S 2 , the probability that g 1 = 0 is P (g 1 =
O | S 2 ) is P where g 1 = 0 in Table 3.
Find the sum of (x|S 2 ) and P(g 1 =0|S 2 )=P(x=4|S 2 )+P(x=5|
S 2 ) + P (x = 6 | S 2 ) + P (x = 7 | S 2 ) = 0.05 + 0.1 + 0.25 + 0.1 = 0.
It is found as 5. The probability that g 2 =0 and g 3 =0 can be similarly determined from the sum of the corresponding P(x|S). g i (i=1~3) is 1

【表】【table】

【表】【table】

【表】【table】

【表】 ある確率は1からgiが0である確率を引けば求ま
る。 P(gi=1|S)=1−P(gi=0|S) S=S1,S2についてこのようにして求めたP
(gi|S)を第2表および第4表に示す。S=S1
のとき第2表に示すごとくg1が最も0である確率
が高く、g2,g3と順に0である確率は減少する。
一方S=S2のときは第4表に示すごとくg3が最も
0である確率が高く、g1で0,1である確率が
半々であり、g2では0より1である確率が高い。 P(x|S)の分布が単峰性であるS=S1につ
いてはg1は0である確率が高くg2,g3の順で0で
ある確率が減少し、期待されたgiの確率的性質が
確かめられたが、P(x|S)の分布が双峰性で
あるS=S2については、g2が0より1である確率
が高くその確率的性質は期待されたものではな
く、1次元ランレングス符号化に適さない。 本発明の目的は、予測誤差信号の発生法に工夫
をこらし、1次元ランレングス符号化に適合する
予測誤差信号を発生し、すでに2値画像信号用に
開発されている1次元ランレングス符号器とほぼ
同じ構成の符号器を用い予測誤差信号を効果的に
符号化することを可能にした多値画像信号符号化
復号化方式を提供するためにある。 本発明によればすでに入力ずみの画像信号Sに
基づき次に入力される画像信号xの実際の信号値
が何番目の予測値に一致するかその順位を検出
し、前記順位に対応する複数の予測誤差信号を発
生して前記画像信号xを予測符号化し、前記各予
測誤差信号が0である確率の高さを示すモード信
号をS及び圧縮符号化ずみの予測誤差信号に基づ
き発生し、前記各予測誤差信号をそれに対応する
各モード信号に基づきグループ分けした後に圧縮
符号化する多値画像信号符号化方式と、すでに伸
長及び予測復号化ずみの画像信号S及び伸長復号
化ずみ予測誤差信号に基づきモード信号を発生し
モード信号に対応する予測誤差信号を圧縮符号か
ら伸長復号化し、Sと複数の予測誤差信号に基づ
き画像信号xを予測復号化する多値画像信号復号
化方式とからなる多値画像信号の符号化復号化方
式が得られる。 また、更に本発明によれば、すでに入力ずみの
N(2n-1<N2n)値の画像信号Sに基づき、次
に入力する画像信号xを予測するN個の信号値を
予測適中率順に並べる手段と、前記画像信号xの
実際の信号値が前記並べられた信号値の何番目に
一致するかその順位を検出する手段と、前記順位
に対応する高々n個の予測誤差信号ei(1i
n)を発生して前記画像信号xを予測符号化する
手段と、前記各予測誤差信号ei(1in)が
0となる確率の高さを示すモード信号Miを、i
=1のときはSのみに基づき発生し、2in
のときはS及びi−1個の予測誤差信号ej(1
ji−1)に基づき発生する手段と、前記各予
測誤差信号ei(1in)をそれに対応する各
モード信号Mi1in)に基づきグループ分
けした後に圧縮符号化する手段とを有する多値画
像信号符号化装置並びにすでに伸長及び予測復号
化ずみのN(2n-1<N2n)値の画像信号Sに基
づきモード信号M1を発生しモード信号M1に対応
する予測誤差信号e1を圧縮符号から伸長復号化す
る手段と、iが2以上かつ高々nのときモード信
号MiをS及びi−1個の予測誤差信号ej(1j
i−1)に基づき発生しモード信号Miに対応
する予測誤差信号ei圧縮符号から伸長復号化する
手段と、Sと高々n個の予測誤差信号ei(1i
n)に基づきN値画像信号xを予測復号化する
手段とを有する前記の多値画像信号符号化装置と
対になる多値画像信号復号化装置が得られる。 以下図面を用いて本発明について詳細に説明す
る。 第5図は本発明の符号化方式を具体的にした一
例を示す装置のブロツク図である。予測符号化回
路2は多値画像を光電変換して得られた多値画像
信号1(nビツト、N値、但し2n-1<N2n)を
入力し、Sに基づき現在入力中の画像信号の予測
を行ない、その予測誤差信号3を符号化回路4に
送る。予測誤差符号化回路4は予測誤差信号3を
圧縮符号化し予測誤差符号化信号5として出力す
る。制御回路6は、クロツク信号、制御信号、同
期信号を送出し、各回路を制御する。8値(0〜
7)の多値画像信号(1画素当り3ビツト)に対
する予測符号化回路2を1例を第6図に示す。 説明を簡単にするため本例では予測に用いられ
る画像信号Sは第1図の4画素a,b,c,dか
らなるとする。また各画素を3ビツトで表現しレ
ベル0,1,……、7は(0,0,0)、(0,
0,1)、……、(1,1,1)に対応するとす
る。もちろん本例を拡張してもつと多数の画素か
らなるSおよびさらに多くのレベル数を有する多
値画像信号に対する回路を構成するのは容易であ
る。 本予測符号化回路2においては、第6図に示す
ごとく、3ビツトの多値画像信号1が3(l+2)
ビツトのシフトレジスタ7に入力される。ここで
lは主走査線当りの画素数を表わす。順位決定
ROM8はシフトレジスタ7からa,b,c,d4
画素(各画素3ビツト)をアドレスデータとして
入力し、それに基づきaの次の画素xと一致する
確率の最も高いレベルをα1(3ビツト)、次に一致
する確率の高いレベルをα2(3ビツト)、同様にx
と一致する確率の高い順にα3,α4,α5,α6,α7
α8(各3ビツト)を定めデータ(3×8ビツト)
として出力する。順位信号選択回路9は、αi(i
=1〜8)とxを入力しxと一致するαixを検出
し、ix−1を3ビツトで表現しe1,e2,e3として
出力する。以後eiを第iビツトの予測誤差信号と
呼ぶ。このように予測誤差信号ei(i=1〜3)
を定めれば、各eiは常に0である確率が1である
確率より高く、各eiは1次元ランレングス符号化
に適合した信号になる。このような本発明は予測
法を以下予測法Bと呼ぶ。具体的にSがS1=(4,
3,4,5)およびS2=(2,7,6,1)のと
きP=(x|S)の分布が単峰性第3図および双
峰性の第4図である場合を例にあげて説明しよ
う。 第5表、第8表に示すごとくS=Sj(j=1,
2)に基づき順位決定ROM8によつてSjに対す
るα1(i=1〜8)が決定される。番号iが増加
するに従いP(αi|Sj)(j=1,2)
[Table] A certain probability can be found by subtracting the probability that g i is 0 from 1. P (g i = 1 | S) = 1 - P (g i = 0 | S) S = P obtained in this way for S 1 and S 2
(g i |S) are shown in Tables 2 and 4. S=S 1
As shown in Table 2, when , the probability that g 1 is 0 is the highest, and the probability that g 2 and g 3 are 0 decreases in this order.
On the other hand, when S=S 2 , as shown in Table 4, g 3 has the highest probability of being 0, g 1 has an evenly split probability of being 0 and 1, and g 2 has a higher probability of being 1 than 0. . For S=S 1, where the distribution of P(x|S) is unimodal, the probability that g 1 is 0 is high, and the probability that g 1 is 0 decreases in the order of g 2 and g 3 , and the expected g i However, for S=S 2 , where the distribution of P(x|S) is bimodal, the probability that g 2 is 1 is higher than 0, and its stochastic property was expected. It is not suitable for one-dimensional run-length encoding. An object of the present invention is to improve the method of generating a prediction error signal, generate a prediction error signal that is compatible with one-dimensional run-length encoding, and use one-dimensional run-length encoders that have already been developed for binary image signals. The purpose of this invention is to provide a multilevel image signal encoding/decoding method that makes it possible to effectively encode a prediction error signal using an encoder having almost the same configuration as the above. According to the present invention, the order in which the actual signal value of the next input image signal x matches the predicted value is detected based on the already input image signal S, and a plurality of prediction values corresponding to the order are detected. generating a prediction error signal and predictively encoding the image signal x; generating a mode signal indicating a high probability that each of the prediction error signals is 0 based on S and the compression-encoded prediction error signal; A multilevel image signal encoding method that compresses and encodes each prediction error signal after grouping it based on each mode signal corresponding to it, and an image signal S that has already been decompressed and predictively decoded and a prediction error signal that has been decompressed and decoded. A multi-level image signal decoding system that generates a mode signal based on the prediction error signal, expands and decodes the prediction error signal corresponding to the mode signal from the compression code, and comprises S and a multilevel image signal decoding method that predictively decodes the image signal An encoding/decoding scheme for value image signals is obtained. Furthermore, according to the present invention, based on the already input image signal S of N (2 n-1 <N2n) values, N signal values for predicting the next input image signal x are arranged in order of prediction accuracy. means for arranging, means for detecting the order in which the actual signal value of the image signal x matches among the arranged signal values, and at most n prediction error signals e i (corresponding to the order); 1i
n) for predictively encoding the image signal x ;
= 1, it occurs based only on S, and 2in
When S and i-1 prediction error signals e j (1
ji-1); and means for compressing and encoding each of the prediction error signals e i (1in) after grouping them based on the corresponding mode signals M i (1in). The encoding device generates a mode signal M1 based on the N (2 n-1 < N2n) value image signal S that has already been expanded and predictively decoded, and compresses the prediction error signal e1 corresponding to the mode signal M1 . means for decompressing and decoding the mode signal M i from S and i-1 prediction error signals e j (1j
means for decompressing and decoding the prediction error signal e i compressed code generated based on the mode signal M i based on S and at most n prediction error signals e i (1i
A multi-value image signal decoding device that is paired with the above-mentioned multi-value image signal coding device is obtained, which has means for predictively decoding the N-value image signal x based on n). The present invention will be explained in detail below using the drawings. FIG. 5 is a block diagram of a device showing a concrete example of the encoding method of the present invention. The predictive encoding circuit 2 inputs a multi-value image signal 1 (n bits, N values, where 2 n-1 <N2 n ) obtained by photoelectrically converting a multi-value image, and converts the currently input image based on S. The signal is predicted and the prediction error signal 3 is sent to the encoding circuit 4. 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. 8 values (0~
FIG. 6 shows an example of the predictive encoding circuit 2 for the multivalued image signal (3 bits per pixel) in 7). 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 levels 0, 1, ..., 7 are (0, 0, 0), (0,
0,1), ..., (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 multivalued image signal having an even larger number of levels. In this predictive encoding circuit 2, as shown in FIG.
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
Pixels (3 bits for each pixel) are input as address data, and based on that, the level with the highest probability of matching with the next pixel x of a is α 1 (3 bits), and the level with the next highest probability of matching is α 2 ( 3 bits), similarly x
α 3 , α 4 , α 5 , α 6 , α 7 , α 3 , α 4 , α 5 , α 6 , α 7 ,
Define α 8 (3 bits each) and data (3 x 8 bits)
Output as . The rank signal selection circuit 9 selects α i (i
=1 to 8) and x are input, α ix that matches x is detected, i x −1 is expressed in 3 bits, and output as e 1 , e 2 , and e 3 . 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)
, the probability that each e i is always 0 is higher than the probability that it is 1, and each e i becomes a signal suitable for one-dimensional run-length encoding. The prediction method of the present invention is hereinafter referred to as prediction method B. Specifically, S is S 1 = (4,
3, 4, 5) and S 2 = (2, 7, 6, 1), the distribution of P = (x | S) is unimodal in Figure 3 and bimodal in Figure 4. Let me explain it to you. As shown in Tables 5 and 8, S=S j (j=1,
α 1 (i=1 to 8) for S j is determined by the ranking determination ROM 8 based on 2). As the number i increases, P(α i | S j ) (j=1, 2)

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】【table】

【表】 が減少するようにαiは定められている。ここで、
P(αi|Sj)は、参照画像信号S=Sjなる条件の
下でx=αiとなる条件付確率である。2つ以上の
レベルに対して全く同じ確率でxの発生が見込ま
れる場合には、より高いレベルを若い添字番号の
αiに対応させた。S=S1およびS2のとき順位決定
ROM8は第5表、第8表に示されるごとくαi(i
=1〜8)を出力し、選択回路9は、それらとx
を入力し第6表、第9表のごとくe=(e1,e2
e3)を定める。たとえばS=S1、x=5のとき第
5表に示すように2番目に大きい条件付確率P
(α2|S1)=0.20を有するα2=5とxが一致するの
で、第6表に示すようにe=ix−1=2−1=1
(0,0,1)が予測誤差信号として選択回路9
より出力される。予測法Aの場合S=S1,S2に関
し第1表、第3表からeの各ビツトei(i=1〜
3)が0あるいは1となる確率P(ei|Sj)(i=
1〜3、j=1,2)が計算できたように、本発
明の予測法BについてS=S1,S2に関し第6表、
第9表からeの各ビツトei(i=1〜3)が0あ
るいは1となる確率P(ei|Sj)(i=1〜3、j
=1,2)が計算でき第7表、第10表にその結果
を示す。第7表、第10表においては各ei(i=1
〜3)は常に0になる確率が1になる確率より高
く1次元ランレングス符号化に適する。これは本
発明の予測法Bを用いた結果であり、すでに説明
したように予測法Aのgiに対してはこのような性
質が常にあるとは限らない。本発明の予測法Bに
おけるei(i=1〜3)がなぜこのような性質を
有するか以下S=S2の場合を例にあげ説明しよ
う。第7図のa,b,c1=S=S2のときにx=αi
となる。確率P=(αi|S2)(i=1〜8)をαi
横軸にしてグラフ表示してある。a,b,cすべ
て同じグラフであるが斜線のつけ方が異なる。斜
線部の意味については後で説明する。第4図にS
=S2のときにxの発生する確率P(x|S2)(x=
0〜7)がxを横軸にしてグラフ化されている
が、第4図のP(x|S2)を大きい順に左につめ
て並び変えたものが第7図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に相当)より広いので第7図
dに示すごとく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図cの斜線部(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の確立より高い。 以上で本発明の予測法Bによれば予測誤差信号
eの各ビツトei(i=1〜3)は常に0である確
率が1である確率より高いことがわかつた。 第7図のd,e,fについては後で説明する。 以上誤差信号e1,e2,e3の発生方法について説
明してきたが、次に第1,2,3モード信号M1
M2,M3の発生方法について説明しよう。いまま
でe1,e2,e3に関する確率は参照画像信号Sのみ
を条件にして考察してきが、これからはe2に対し
てはSの他にe1を、e3に対してはSの他にe1,e2
を条件としてくりこんで考える。これらあらたに
考え出された条件付確率をS=S1のとき第11表か
ら第13表に、S=S2のとき第14表から第16表に示
した。これらの表においてP(e1|Si)、P(e2
Si,e1)、P(e3|Si,e1,e2)(i=1,2)は下
記の意味を有する。 P(e1|Si):参照画像信号SがSiのき第1ビツ
トの予測誤差信号がe1である確率。 P(e2|Si,e1):参照画像信号SがSiでかつ第
1ビツトの予測誤差信号がe1のとき第2ビ
ツトの予測誤差信号がe2である確率。 P(e3|Si,e1,e2):参照画像信号SがSiでか
つ第1ビツトの予測誤差信号がe1、第2ビ
ツトの予測誤差信号がe2のとき第3ビツト
の予測誤差信号がe3である確率。 上記確率は第5表、第8表のP(αi|S1)、P
(αi|S2)から次のようにして計算される。 P(e1|Si):P(0|Si)=4j=1 P(αj|Si) P(1|Si)=1−P(0|Si) P(e2|Si,e1 P(e3|Si,e1,e2): 第7図d,e,fにこのように計算された条件
付確率をS=S2の場合について図示した。第7図
を用いて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のどれかになる確率。すな
わち第7図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のどちらかになる確率。すなわち第
7図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になる確率。すなわち第7図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)はそれぞれ第7
図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)を用いて次のように
定められている。 M1:P(O|S)が与えられた確率Ppと等しいか
より大きいとき0、小さいとき1 M2:P(0|S,e1)が与えられた解率Ppと等し
いかより大きいとき0、小さいとき1 M3:P(0|S,e1,e2)が与えられた確率Pp
等しいかより大きいとき0、小さいとき1 第17表、第18表にS=S1,S2のときのモード信
号Miの一覧表を掲げた。これらは第11表から第
13表、第14表から第16表の条件付確率に基づきPp
=0.7を用いて作成されている。モード信号Mi
決定法には、条件付確率P(e1|S)、P(e2
S)、P(e3|S)を用いる方法もあるが、後でわ
かるように本方法よるほうが効率的な符号化を実
現できる。
[Table] α i is determined so that . here,
P(α i |S j ) is the conditional probability that x=α i under the condition that the reference image signal S=S j . When x is expected to occur with exactly the same probability for two or more levels, the higher level is associated with a smaller subscript number α i . Ranking determined when S=S 1 and S 2
As shown in Tables 5 and 8, ROM8 has α i (i
=1 to 8), and the selection circuit 9 outputs them and x
As shown in Tables 6 and 9, e=(e 1 , e 2 ,
e3 ). For example, when S=S 1 and x=5, as shown in Table 5, the second largest conditional probability P
Since x matches α 2 =5 with (α 2 |S 1 )=0.20, e=i x −1=2−1=1 as shown in Table 6.
(0, 0, 1) is selected as the prediction error signal by the selection circuit 9
It is output from In the case of prediction method A , each bit e i (i = 1~
3) is 0 or 1, P(e i | S j )(i=
1 to 3, j=1, 2), Table 6 shows S=S 1 , S 2 for prediction method B of the present invention,
From Table 9, the probability that each bit e i (i = 1 to 3) of e is 0 or 1 is P (e i | S j ) (i = 1 to 3, j
=1,2) can be calculated and the results are shown in Tables 7 and 10. In Tables 7 and 10, each e i (i=1
~3) is suitable for one-dimensional run-length encoding because the probability that it becomes 0 is always higher than the probability that it becomes 1. This is a result of using prediction method B of the present invention, and as already explained, such a property does not always exist for g i of prediction method A. Why e i (i=1 to 3) in prediction method B of the present invention has such a property will be explained below using the case of S=S 2 as an example. When a, b, c1 = S = S 2 in Figure 7, x = α i
becomes. The probability P=(α i |S 2 ) (i=1 to 8) is graphically displayed 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. S in Figure 4
Probability of occurrence of x when = S 2 P (x | S 2 ) (x =
0 to 7) are graphed with x as the horizontal axis, but Figure 7 a, b, and c are the results of rearranging P(x|S 2 ) in Figure 4 by moving it to the left in descending order of magnitude. be. P
(x|S 2 ) had a bimodal distribution, but P(α i |S 2 )
The distribution is rearranged from left to right in descending order of magnitude, resulting in a descending distribution to the right. As is clear from the method of creation, no matter what type of distribution P(x|S) is, P(α i | S) is generally 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 the probability of e 1 =0 is higher than the probability of e 1 =1, as shown in FIG. 7d. Similarly, the shaded area in Fig. 7b (x=α 1 , α 2 ,
α 5 , α 6 , e=0, 1, 4, 5, corresponding to e 2 = 0) are the blank parts (x=α 3 , α 4 , α 7 , α 8 , e=2,
3, 6, 7, equivalent to e 2 = 1), so
The probability of e 2 =0 is higher than the probability of e 2 =1. Furthermore, the shaded area in FIG. 7c (x=α 1 , α 3 , α 5 , α 7 , e=0,
2, 4, 6 (equivalent to e 3 = 0) are blank parts (x
= α 2 , α 4 , α 6 , α 8 , e=1, 3, 5, 7, i.e.
e 3 = 1), so the probability of e 3 = 0 is e 3 =
The probability is higher than 1. As described above, it has been found that according to the prediction method B of the present invention, the probability that each bit e i (i=1 to 3) of the prediction error signal e is always 0 is higher than the probability that it is 1. d, e, and f in FIG. 7 will be explained later. The method for generating the error signals e 1 , e 2 , e 3 has been explained above, but next, the method for generating the first, second, third mode signals M 1 ,
Let's explain how M 2 and M 3 are generated. Up 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 , e 2
Let's renormalize and think about the condition. These newly devised conditional probabilities are shown in Tables 11 to 13 when S=S 1 , and Tables 14 to 16 when S=S 2 . In these tables, P(e 1 | S i ), P(e 2 |
S i , e 1 ) and P(e 3 |S i , e 1 , e 2 ) (i=1, 2) have the following meanings. P(e 1 |S i ): Probability that the prediction error signal of the first bit is e 1 when the reference image signal S is S i . P(e 2 |S i , e 1 ): probability that the second bit prediction error signal is e 2 when the reference image signal S is S i and the first bit prediction error signal is e 1 . P(e 3 | S i , e 1 , e 2 ): When the reference image signal S is S i 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 5 and 8.
It is calculated from (α i |S 2 ) as follows. P(e 1 | S i ): P(0 | S i ) = 4j=1 P(α j | S i ) P(1 | S i )=1−P(0 | S i ) P(e 2 |S i , e 1 : P(e 3 | S i , e 1 , e 2 ): The conditional probabilities calculated in this manner are illustrated in FIGS. 7d, e, and f for the case of S=S 2 . Using Figure 7, 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 the probability that x will be one of α 1 , α 2 , α 3 , and α 4 when S=S 2 . That is, the ratio of the shaded area to the whole in FIG. 7a. P(1|S 2 ) is expressed as when S=S 2 and x is α 5 , α 6 ,
Probability of either α 7 or α 8 . That is, the seventh
In figure a, the proportion of blank space to the whole. 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) means that under the same conditions x is α 3 ,
Probability of either α 4 . In other words, the proportion of blank space in the same part. P(0|S 2 , 1) is the probability that x becomes either α 5 or α 6 when S=S 2 and x is α 5 , α 6 , α 7 , or α 8 . That is, the proportion occupied by the shaded area in the right half of FIG. 7a bordering on the dotted line. P(1|S 2 , 1) means that under the same conditions x is α 7 ,
Probability of either α 8 . 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 when x is either α 1 or α 2 , then x is α 1 Probability of becoming . In other words, in Figure 7c, the proportion occupied by the shaded area in the part consisting of α 1 and α 2 . P(1|S 2 , 0, 0) is the probability that x becomes α 2 under the same conditions. In other words, the proportion of blank space in the same part. P(0|S 2 ,0,1), P(0|S 2 ,1,
0) and P(0|S 2 , 1, 1) are the seventh
In figure c, the proportion occupied by the shaded area in the part consisting of α 3 and α 4 , α 5 and α 6 , α 7 and α 8 is P(1 | S 2 ,
0,1), P(1|S 2 ,1,0), P(1|
S 2 , 1, 1) is the percentage of blank space in each part. The mode signal M i is the conditional probability P(e 1 | S), P(e 2 | S, e 1 ), which has been explained in detail above.
It is defined as follows using P(e 3 |S, e 1 , e 2 ). M 1 : 0 if P(O|S) is equal to or greater than the given probability P p , 1 if smaller M 2 : Is P(0|S, e 1 ) equal to the given solution probability P p ? 0 when it is greater than, 1 when it is less than M 3 : 0 when P(0|S, e 1 , e 2 ) is equal to or greater than the given probability P p , 1 when it is less Tables 17 and 18 show S A list of mode signals M i when = S 1 and S 2 is listed. These are from Table 11.
P p based on the conditional probabilities in Tables 13 and 14 to 16
=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】

【表】 第6図の予測符号化回路2に戻つて説明を続け
よう。第6図で第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はROM11,12おいて不要な入力デー
タとなり、予測符号化回路2はより簡単な回路構
成になるが後でわかるように符号化効率は低下す
る。以上8値で4画素参照の場合について説明し
てきたが、一般にN(2n-1<N2n)値でm画素
参照の場合に拡張するのは容易である。このとき
第6図の予測符号化回路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とし
て発生しないレベルすなわち7である。x=α8
7とはなりえないから、常にe≠(1,1,1)
である。よつてe1=e2=1のときe3は必ず0であ
り、このとき第3ビツトの予測誤差信号e3を発生
する必要はない。このようにN≠2nのときには常
にnビツトの予測誤差信号を発生する必要はな
い。また一般にN(2n-1<N2n)値のときは各ei
(i=1〜n)に対応してn個設置されそれぞれ
モード信号Mi(i=1〜n)を出力する。M1
定用ROMはSのみを用いてM1を決定し、Mi
定用ROM(i=2〜n)はS及びe1〜ei-1を用い
てMiを決定する。 次に以上のようにして得られた予測誤差信号を
符号化する圧縮符号化回路について説明する。第
5図の予測符号化回路2すなわち具体的には第6
図に示された予測符号化回路2の出力e1,e2,e3
は第5図の圧縮符号化回路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に
なることと考えればこれを本発明に適用できる。
このとき第6図の予測符号化回路2は予測誤差信
号e1,e2,e3の他にそれらが上記2グループのど
ちらに属するかを示す第1,2,3モード信号
M1,M2,M3を出力する必要がある。第6図の
ROM15,16,17の出力データM1,M2
M3(各1ビツト)はこのモード信号であり、e1
e2,e3とともに符号化回路4に加えられる。第6
図で注意すべき点は、第2モード信号発生用
ROM16は参照画像信号の他にe1を、第三モー
ド信号発生用ROM17はe1とe2を用いているこ
とである。これが本発明と従来の2値画像信号符
号化装置(例えば特開昭52−79610号公報、書画
通信方式)と本質的に異なる点である。もちろん
多値画像信号符号化装置においても従来の2値画
像信号符号化装置と同じように参照画像信号のみ
を用いてすべてのモード信号を決定してもよい
が、後で説明するように符号化効率は低下する。
このようにモード信号を利用する場合、第5図の
圧縮符号化回路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を定めたとすると
第19表を得る。これは第7表から境界の確率Pp
0.7として求めた。これとSのみならずe1,e2
利用してモード信号を定めた第17表とを比較すれ
ばわかるように、M1は双方ともSのみで定める
ので変りはないが、M2は第19表ではe1にかかわ
らず1であるのに対し、第17表ではe1が0のとき
は0,1のときは1でありより細かく場合わけし
正確に定められている。同様にM3は第19表では
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のみならずei
あるいはe2をモード信号M2,M3の決定に用いる
べきであることがわかる。なおS=S2のときSの
みによつて各モード信号Miを定めた例を第20表
に示す。これは第10表から境界の確率Pp=0.7と
して求めた。S=S1の場合と同様に第18表と第20
表を比較されたい。 第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,e2,e3及び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にセツトした後カウンタ83
をクリアする。ランレングス符号発生器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に対するei
に対しては、カウンタ87、ランレングス符号発
生器88、ラン終了検出回路90、および入力禁
止回路58が同様の動作を行ない、Mi=1に対
するeiのランを検出し、そのラン長を符号化す
る。ランレングス符号発生器88は84に比べて
長いランに対して比較的短い符号を発生し効率の
よい符号化を行なう。ランレングス符号発生器8
4,88から発生するランレングス符号RLC0、
RLC1の出力順序には注意を要する。単純に各
ランレングス符号をランレングス符号発生器8
4,88からの発生順に本符号器から出力したな
らば復号器で復号不可能となる。復号できるよう
にするには、各ランの先頭に位置する信号eiに注
目し、その先頭符号を予測回路から取り入れた順
にすなわち各ランの発生順に各ランのランレング
ス信号を発生する必要がある。第10図においい
てランレングス符号発生器84,88の右側に記
された部分を中心とする回路はこのランレングス
符号の出力順序の制御を行う。その動作を第11
図のタイムチヤートを用いて具体的に詳しく説明
しよう。第11図において最上段に記されている
kはその下に記されている予測誤差信号ei、モー
ド信号Miが何番目に入力されたか、その順位を
以下の説明に便利のために示す。信号の入力は間
欠的に行なわれるのでkは常に一定時間ごとに更
新されるわけではなく、ランレング符号発生器8
4,88がランレングス符号発生中には更新され
ない。第11図におけるk以外の信号は第10図
の回路上に記されているが以下各信号に説明を加
える。ei,Miは選択回路76,77の出力信号で
あり、COU1,COU0はカウンタ83,87の
出力信号でそれぞれのカウント値を示す。RCS
1,RCS0はラン終了検出回路86,90の出
力でランの検出を示すパルス信号である。RLC
1,RLC0はランレングス符号発出器84,8
8の出力符号であり、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はこれを受けROS0を発生し、カウンタ87
の内容COU0=2をランレングス符号発生器88
にセツトし、その直後カウンタ87をリセツトす
る。またRCS0は入力禁止回路58をセツトし
IHB0をHレベルに従つてINHBをHレベルにし
レジスタ38,39が予測誤差信号e1,e2,e3
びモード信号M1,M2,M3を入力するのを一時
禁止する。ランレングス符号発生器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をトリガ
信号として入力し、第21表のごとくCOU1,
COU0,Miに基づき新なSWCH信号を出力す
る。第21表について詳しく説明しよう。MEMP
が発生するときSWCH信号が変化するが、その
タイミングは第1にはRLC1をメモリ43を介
さずに直接RLCDとして出力した後、メモリ43
内のRLC0を読み出してRLCDとして出力し終え
た直後であり、第2にはRLC0をメモリ43を
介さずに直接RLCDとして出力した後メモリ43
内のRLC1を読み出してRLCDとして出力し終え
た直後である。第1のときカウンタ83がRCS
1によりクリアされてCOU1=0であり、第2の
ときカウンタ87が
[Table] Let us return to the predictive encoding circuit 2 in FIG. 6 and continue the explanation. For 1st, 2nd and 3rd mode signal generation in Figure 6
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 | S)
If we decide to determine M 1 , M 2 , M 3 using
e 1 and e 2 become unnecessary input data in the ROMs 11 and 12, and although the predictive encoding circuit 2 has a simpler circuit configuration, the encoding efficiency decreases as will be seen later. Although the case of 4-pixel reference with 8 values has been described above, it is generally easy to extend this to the case of m-pixel reference with N (2 n-1 <N2 n ) values. At this time, in the predictive encoding circuit 2 of FIG. 6, the ROM 8 inputs m n-bit pixels as address data, and
α i (1iN) consisting of bits is output as N pieces of data. The selection circuit 9 inputs α i (1iN) and x consisting of n 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 x can take on levels 0, 1, . . . , 6 in a 7-value image signal. Since N=7, n=3, and α 8 is a level that never occurs as x, that is, 7. x= α8 =
Since it cannot be 7, it is always e≠(1,1,1)
It is. 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. In this way, when N≠2 n, it is not necessary to always generate an n-bit prediction error signal. In general, when the value is N (2 n-1 < N2 n ), each e i
(i=1 to n), and each outputs a mode signal M i (i=1 to n). The M 1 determination ROM determines M 1 using only S, and the M i determination ROM (i=2 to n) determines M i using S and e 1 to e i-1 . Next, a compression encoding circuit that encodes the prediction error signal obtained as described above will be explained. Predictive encoding circuit 2 in FIG.
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 ,
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 Application 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 shown in FIG.
It is necessary to output M 1 , M 2 , and M 3 . Figure 6
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 . 6th
The point to note in the diagram is that for the second mode signal generation
The ROM 16 uses e 1 in addition to the reference image signal, and the third mode signal generation ROM 17 uses e 1 and e 2 . 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. In Figure 9, 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 This corresponds to i =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, the second bit prediction error signal e 2 comes after e 1 and the third bit prediction error signal e 3 comes after e 1 , e 2
If we decide to encode after e 2 , the encoding of e 2 requires not only S but also e 1 encoded before e 2,
For encoding e 3 , not only S but also e 1 and e 2 encoded prior to e 3 can be used. Therefore, the mode signal M 2 that indicates the high probability that e 2 becomes 0 is determined using not only S but also e 1 , and the mode signal M 3 that indicates the high probability that e 3 becomes 0 is determined only by S. It is more advantageous to decide using e 1 and e 2 . For example, when S=S 1 , S
If each mode signal M i is determined only by , Table 19 is obtained. This is determined from Table 7 by the boundary probability P p =
It was calculated as 0.7. As can be seen by comparing this with Table 17, 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 19, it is 1 regardless of e 1 , whereas in Table 17, 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 19.
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 i
Alternatively, it can be seen that e 2 should be used to determine the mode signals M 2 and M 3 . Table 20 shows an example in which each mode signal M i is determined only by S when S=S 2 . This was obtained from Table 10 as the boundary probability P p =0.7. Tables 18 and 20 as in the case of S=S 1
Please compare the tables. FIG. 10 shows an example of the compression encoding circuit 4 used in the method of the present invention. 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).
In addition, in this circuit, the "run per prediction+prediction error pixel" is defined as one run, the run length is set as "the length in which e i =0 continues", 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; the upper part is a run encoding circuit consisting of e i corresponding to M i =1, while the lower part is a run encoding circuit consisting of e i corresponding to M i =0. This is a run encoding circuit consisting of . In FIG. 10, e 1 , e 2 , e 3 , M 1 , M 2 , and M 3 are 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 , then select one each of e 2 and M 2 , and 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 stored in the 3-bit register 38. , 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 =0.
(L level), it is inverted by the NOT circuit 80.
It is 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
count up when level). The run end detection circuit 86 outputs a pulse signal when e i becomes H level.
After outputting RCS1 and setting the contents of the counter 83 in the run-length code generator 84, the counter 83
Clear. 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 coded. 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 a flip-flop which is set by the RCS1 signal and reset by the RCE1 signal, and applies its output signal IHB1 to the registers 38 and 39 through the OR circuit 52. The IHB1 signal is an H level signal when the run-length code generator 84 is outputting the code RLC1,
When it receives INHB at H level, it temporarily stops inputting e i and M i during that time. e i 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 to detect the run of e i for M i =1 and determine the run length. encode. Run length code generator 88 generates relatively short codes for long runs compared to code 84 to provide efficient encoding. Run length code generator 8
Run length code RLC0 generated from 4,88,
Care must be taken regarding the output order of RLC1. Simply convert each run-length code into a run-length code generator 8.
If the encoder outputs the signals in the order of occurrence starting from 4 and 88, the decoder will not be able to decode them. In order to be able to decode it, it is necessary to focus on the signal e i located at the beginning of each run, and generate run length signals for each run in the order in which the leading code is taken in from the prediction circuit, that is, in the order in which each run occurs. . In FIG. 10, the circuit centered on the portion shown to the right of the run-length code generators 84 and 88 controls the output order of the run-length codes. The action is the 11th
Let's explain in detail using the time chart shown in the figure. In Fig. 11, k written at the top row indicates the order in which the prediction error signal e i and mode signal M i written below are input, and their order for convenience in the following explanation. . Since the signal is input intermittently, k is not always updated at regular intervals, and the run-length code generator 8
4,88 are not updated during run-length code generation. 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 the output signals of the selection circuits 76 and 77, and COU1 and COU0 are the output signals of the counters 83 and 87 and indicate the respective count values. RCS
1, RCS0 is a pulse signal output from the run end detection circuits 86 and 90 and indicates run detection. R.L.C.
1, RLC0 is run length code generator 84,8
RCE1 and RCE0 are pulse signals indicating the end of generation of run-length codes RLC1 and RLC0 output from run-length code generators 84 and 88, respectively. 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 the output of the OR circuit 52, and when this signal is at H level, the registers 38 and 39 temporarily stop inputting to e 1 , e 2 , e 3 , M 1 , M 2 , and M 3 . SWCH is the output of the switch signal generation circuit 41, and when this signal is at H level,
RLC1 and RLC0 are applied to a selection circuit 46 and a memory 43, respectively, via a switch circuit 42, and when these signals are at L level, the connections are reversed.
RLCE is the output signal of the selection circuit 40 when SWCH is high.
When SWCH is at L level, it is the same as RCE1, and when SWCH is at L level, it is the same as RCE0. RLCD is the output signal of this encoding circuit. When REDM is at H level, the run length code read from the run length code memory 43 is selected by the selection circuit 46 as RLCD.
When REDM is at L level, the run-length code generated from run-length code generator 84 or 88 is directly selected as RLCD by selection circuit 46 without going through 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 ROS0, counter 87
The contents of COU0=2 are converted into run-length code generator 88
Immediately thereafter, the counter 87 is reset. RCS0 also sets the input prohibition circuit 58.
Following IHB0 to H level, INHB is set to H level to temporarily prohibit registers 38 and 39 from inputting prediction error signals e 1 , e 2 , e 3 and mode signals M 1 , M 2 , M 3 . Run length code generator 88 is COU0
Since the run length code RLC0=C2 corresponding to = 2 is generated and SWCH is at H level, the switch circuit 42
After 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 generated for the first time is not immediately output as the output signal RLCD of the present encoding circuit, but is temporarily written into the memory 43. 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 of FIG. 11, when k=1, e i =
0, M i =1, a run for M i =1 occurs first, when k = 2, this run continues for e i =0, M i =1, and when k = 3, e i =0 , M i =0 and M i =
When a run for 0 occurs for the first time and k=4, e i
=0, M i =0, this run continues, and when k=5, e i =1, M i =0, the run for M i =0 ends with run length 2, and code C2 is generated. That is, at the time of k=5, the run for M i =1 is continuing without ending, and although it occurs earlier than the run for M i =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 k
= 5 and ended with length 2, so run length code C2 was generated first. 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. To avoid this, the switch signal generation circuit 41
, counters 83 and 87 are cleared and COU0=
0, in the initial state where COU1=0,
If the mode signal M i =1, it detects that a run for M i =1 has occurred before a run for M i =0, sets SWCH to H level, and activates the switch circuit 42 to select RLC1. RLC0 to 46
is connected to the memory 43, and RLC0 is written to the memory 43 first. Conversely, if M i =0 in the initial state, it is detected that a run for M i =0 has occurred before a run for M i =1, SWCH is set to L level, and the switch circuit 42 is activated. RLC0 to selection circuit 46,
RLC1 is connected to memory 43, and conversely RLC1 is written to memory 43 first. Let's follow the specific signal changes on the time chart again. At k=5, RLC0=C2 was generated and written to the memory 43, but in the same way, at k=7,9, M i =
The end of a run of length 1 and length 0 for 0 is detected and the corresponding run length code RLC0 = C3,
C4 is written to memory 43. k=1 to 9
Until then, all e i for M i =1 are 0, and the run for M i =1 that occurred when k=1 continues without ending. k=10, and e i =
1, M i =1, the end of the run for M i =1 is detected for the first time, and the content of the counter 83 COU1 =
3 is set in the run length code generator 84, and the counter 83 is reset immediately thereafter. Also
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 , e 3 mode signals.
Temporarily prohibits input of M 1 , M 2 , and M 3 . The run-length code generator 84 generates a run-length code RLC1=C1 corresponding to COU1=3,
Since SWCH is H, RLC1 is connected to the selection circuit 46 via the switch circuit 42, and since REDM is L, the selection circuit 46 selects it and outputs it as the output code RLCD of the encoding circuit. The code C1 for M i =1 is the code C1, C2 for M i =0,
Although generated after C3, the run corresponding to the code C1 starts generation when K=1, and is a run that precedes the runs corresponding to codes C2, C3, and C4. Therefore, based on the principle of "outputting run-length codes in the order in which runs occur," code C1 is first output.
Output as RLCD. After the run-length code generation circuit 84 finishes generating the code C1, it outputs RCE1, and since SWCH is at H level, the selection circuit 40 selects RCE1 and outputs it as RLCE.
RLCE sets flip-flop 44 and REDM
is set to H level, and the selection circuit 46 sets it to H level.
After receiving REDM, select memory 43 and its contents C2,
Read out C3 and C4 and get the output code of this encoding circuit.
Output as RLCD. While REDM is at H level
INHB becomes H level and e 1 , e 2 , e 3 , M 1 , M 2 ,
Input of M3 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, 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 21, COU1,
A new SWCH signal is output based on COU0, M i . Let me explain Table 21 in detail. MEMP
The SWCH signal changes when
Immediately after reading RLC0 in the memory 43 and outputting it as RLCD, secondly, after directly outputting RLC0 as RLCD without going through the memory 43, the memory 43
This is immediately after reading RLC1 in the file and outputting it as RLCD. At the first time, counter 83 is RCS
1, COU1=0, and the counter 87 is cleared at the second time.

【表】 RCS0によりクリアされてCOU0=0であり、い
ずれにしてもMEMP発生時にはCOU1,COU0
のどちらか一方は0である。COU1=COU0=0
のときには、カウンタ83,87で計数中のラン
はないので、Miに基づき先にRLCDとして出力
すべきランレングス符号を定める。すなわちMi
=0ならばSWCHをLレベルにしてRLC0を先
に、Mi=1ならばSWCHをHレベルにしてRLC
1を先に出力するようスイツチ回路42を設定す
る。後回しにされたランレングス符号はメモリ4
3に一旦書き込まれ、先に出力すべき符号が
RLCDとして出力された後続み出されRLCDとし
て出力されることになる。COU1=0、COU0≠
0のときはカウンタ87がMi=0に対するラン
を計数中なので、この計数中のランに対応する符
号をまず先にRLCDとして出力する必要がある。
それゆえSWCHをLレベルにしてRLC0を先に
出力するようスイツチ回路42を設定する。
RLC1はメモリ43に一旦書き込まれ、RLC0
がメモリを介さずにRLCDとして出力された後、
メモリ43から読み出され、RLCDとして出力さ
れることになる。COU1≠0、COU0=0のとき
はカウンタ83がMi=1に対するランを計数中
なので、この計数中のランに対応する符号をまず
先にRLCDとして出力する必要がある。それゆえ
SWCHをHレベルにしてRLC1を先に出力する
ようスイツチ回路42を設定する。RLC0は一
旦メモリ43に書き込まれ、RLC1がメモリを
介さずRLCDとして出力された後、メモリ43か
ら読み出されRLCDとして出力されることにな
る。以上が第21表の説明である。 k=11において、MEMPが発生するが、
COU0=COU1=0,Mi=0なので、第21表に従
い、SWCHはLレベルになる。k=11においてei
=1なのでMi=0に対するランが発生と同時に
ラン長0で終了し、RLC0としてランレングス
符号C5が発生されSWCHがLレベルなのでメ
モリ43を介さずスイツチ回路42、選択回路4
6を通つてRLCDとして出力される。ランレング
ス符号C5の出力が終了するとランレングス符号
発生器88はRCE0を発生し、選択回路40は
RCE0を受けSWCHがLレベルなのでこれを
RLCEとして出力する。フリツプフロツプ44は
RLCEによりセツトされHレベルのREDMを出力
する。選択回路46はHレベルのREDMを受け
メモリ43を選択しその内容を読み出そうとする
がメモリ43には何も書かれてないので直ちに
MEMPが出力される。フリツプフロツプ44は
MEPMによりリセツトされREDMはLレベルに
なる。選択回路46はLレベルのREDMを受け、
メモリ43の読み出しを停止し、スイツチ回路4
2の出力を選択する。レジスタ38,39は
REDMがLになるとINHBがLになるのでe1
e2,e3,M1,M2,M3の入力を再開する。 結局REDMがHレベルになるのは一瞬のこと
でありタイムチヤートには特に記してない。k=
12においてスイツチ信号発生回路41は前記の
MEMPを受け、COU1=COU0=0、Mi=1に
基づき(第21表参照)HレベルのSWCHを出力
する。k=12においてei=1なのでMi=1に対す
るランガ発生と同時にラン長0で終了し、RLC
1としてランレングス符号C6が発生され
SWCHがHレベルなのでメモリ43を介さずス
イツチ回路42、選択回路46を通つてRLCDと
して出力される。ランレングス符号C6の出力が
終了するとランレングス符号発生器84はRCE
1を発生し、選択回路40はRCE1を受け
SWCHがHレベルなのでこれをRLCEとして出力
する。フリツプフロツプ44はRLCEによりセツ
トされHレベルのREDMを出力する。選択回路
46はHレベルのREDMを受けメモリ43を読
み出そうとするがメモリ43には何も書かれてな
いので直ちにMEMPが出力される。フリツプフ
ロツプ44はMEMPによりリセツトされREDM
はLレベルになる。選択回路46はLレベルの
REDMを受けメモリ43の読み出しを停止し、
スイツチ回路42の出力を選択する。レジスタ3
8,39はREDMがLになるとINHBがLにな
るのでe1,e2,e3,M1,M2,M3の入力を再開す
る。結局REDMがHレベルになるのは一瞬のこ
とであり、タイムチヤートには特に記してない。
k=13において、スイツチ信号発生回路41は
MEMPを受け、COU1=COU0=0、Mi=1に
基づき(第21表参照)HレベルのSWCHを出力
する。k=13,14,15においてはei=0なのでラ
ンレングス符号は発生されないがk=16において
はei=1、Mi=0、COU0=1ゆえMi=0に対す
るラン長1のランレングス符号C8が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、選択回路4
6を通つてRLCDとして出力される。ランレング
ス符号C7の出力が終了するとランレングス符号
発生器84はRCE1を発生し、選択回路40は
RCE1を受けSWCHがHレベルなのでこれを
RLCEとして出力する。フリツプフロツプ44は
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に基づき(第21表参照)
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は予測誤差信号47を
入力し予測復号化して復号化画像信号48として
出力する。なお予測誤差符号化信号45はすでに
詳しく説明した本発明の符号装置によつて発生さ
れたものとする。制御回路20はクロツク信号、
制御信号、同期信号を送出し各回路を制御する。
8値(0〜7)の多値画像信号(1画素当り3ビ
ツト)に対する予測復号化回路19の1例を第1
3図に示す。説明を簡単にするため本例では予測
に用いられた画像信号Sは第1図の4画素a,
b,c,dからなるとする。 また各画素を3ビツトで表現しレベル0,1…
…7は(0,0,0)、(0,0,1)、……、
(1,1,1)に対応するとする。もちろん本例
を拡張してもつと多数の画素からなるSおよびさ
らに多くのレベル数を有する多値画像信号に対す
る回路を構成するのは容易である。 予測復号化回路19においては、第13図に示
すごとくすでに復号化ずみの画像信号が3(l+
2)ビツトのシフトレジスタ28に第13図に示
されるごとくセツトされている。ここで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へ
加える。選択回路27は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はレベル信号選択回路5
0へ制御信号として加えられ、今まで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画素だけ
格納データをシフトし、次の画素の復号化動作に
対し準備する。予測復号化回路19の第1、第
2、第3モード信号発生用ROM23,24,2
5、順位決定ROM26は予測符号化回路2の第
1、第2、第3モード信号発生用ROM15,1
6,17、順位決定ROM9と全く同じである。 次に伸長復号化回路18について説明する。予
測誤差復号化回路18は、第14図に示すように
大きくわけて上下2つの部分からなる。上部は
Mi=1に対応する予測誤差符号化信号に対する
復号化回路であり、下部はMi=0に対応する予
測誤差符号化信号に対する復号化回路である。伸
長復号化回路18の役割りはモード信号Miを予
測復号化回路19から受けとりそれに対応する予
測誤差信号eiを予測復号化回路19へ出力するに
あり、Mi=0なるモード信号を受けとると上部
の回路が動作し、Mi=1なるモード信号を受け
とると下記の回路が動作する。バツフアメモリ2
9には予測誤差符号化信号RCLD45がランレン
グス符号化されて蓄積されており、それはMi
1のときにはランレングス復号化回路31より要
求があると読み出され、Mi=0のときにはラン
レングス復号化回路32より要求があると読み出
される。ランレングス復号化回路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回路6
1,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に対応するランレングス
符号がすでに復号されているときである。予測誤
差復号化回路19は、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回66を介してフリツプフロツプ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は信号ei(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
レベルゆえ、ENB2がHレベルであり、カウン
タ36がカウントダウンされ、その内容CON0
は−1になる。CON0が−1ゆえ復号化スター
ト信号発生回路34は信号RDS0を発し、ラン
レングス復号化回路32の動作をスタートさせ
る。またRDS0はOR回路65を介してフリツプ
フロツプ67をセツトし信号DECDをHレベルに
する。ランレングス復号化回路32は動作を開始
し、スイツチ回路30を介してバツフアメモリか
らランレングス符号C2をRLC0として入力し
復号する。ランレングス復号化回路32はランレ
ングス符号C2の復号を終了するとその結果をカ
ウンタ36にセツトし信号RDE0を発し、OR回
路66を介してフリツプフロツプ68をリセツト
し信号DECDをLレベルにし復号終了を知らせ
る。予測誤差信号発生回路60は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] Cleared by RCS0, COU0=0, and in any case, when MEMP occurs, COU1, 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 RLC
The switch circuit 42 is set to output 1 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 RLCD, it will be extracted and output as 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 memory 43, and RLC0
After is output as RLCD without going through memory,
It will be read out from the memory 43 and output as RLCD. When COU1≠0 and COU0=0, the counter 83 is counting runs for M i =1, so it is first necessary to output the code corresponding to the run being counted as RLCD. therefore
The switch circuit 42 is set to set SWCH to H level and output RLC1 first. RLC0 is once written into the memory 43, RLC1 is outputted as RLCD without going through the memory, and then read out from the memory 43 and outputted as RLCD. This concludes the explanation of Table 21. MEMP occurs at k=11, but
Since COU0=COU1=0 and M i =0, SWCH becomes L level according to Table 21. e i at k=11
= 1, so 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 switch circuit 42 and the selection circuit 4 do not go through the memory 43.
6 and output as RLCD. When the output of the run-length code C5 is finished, the run-length code generator 88 generates RCE0, and the selection circuit 40
Since SWCH is at L level after receiving RCE0, use this
Output as RLCE. The flip-flop 44 is
It is set by RLCE and outputs H level REDM. The selection circuit 46 receives the H level REDM and selects the memory 43 and tries to read its contents, but since nothing is written in the memory 43, it immediately
MEMP is output. The flip-flop 44 is
It is reset by MEPM and REDM goes to L level. The selection circuit 46 receives the L level REDM,
The reading of the memory 43 is stopped and the switch circuit 4
Select output 2. Registers 38 and 39 are
When REDM becomes L, INHB becomes L, so e 1 ,
Restart input of e 2 , e 3 , M 1 , M 2 , and M 3 . 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 21). Since e i = 1 at k = 12, the run length ends at 0 at the same time as the rung is generated for M i = 1, and RLC
Run length code C6 is generated as 1.
Since SWCH 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 finished, the run-length code generator 84 outputs RCE.
1, and the selection circuit 40 receives RCE1.
Since SWCH is at H 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 attempts to read the memory 43, but since nothing is written in the memory 43, MEMP is immediately output. Flip-flop 44 is reset by MEMP and REDM
becomes L level. The selection circuit 46 is at L level.
Upon receiving REDM, reading of the memory 43 is stopped,
The output of the switch circuit 42 is selected. register 3
Since INHB becomes L when REDM becomes L, input of e 1 , e 2 , e 3 , M 1 , M 2 , and M 3 is restarted. 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
Upon receiving MEMP, it outputs an H level SWCH based on COU1=COU0=0 and M i =1 (see Table 21). At k=13, 14, and 15, e i =0, so no run-length code is generated, but at k=16, e i =1, M i =0, and COU0=1, so a run with run length 1 for M i =0 is generated. Length code C8 is generated as RLC0, and SWCH is at H level, so RLC0
is temporarily written into the memory 43 via the switch circuit 42. When generation of run-length code C8 is completed, run-length encoder 88 generates RCE0, and selection circuit 40 receives RCE0, but since SWCH is at L level, it is not selected and RLCE is not output. At k=17, e i =0, so no run-length code is generated, but at k=18, e i =
1. Since M i = 1 and COU1 = 2, a run length code C7 with a run length of 2 for M i = 1 is generated as RLC1, and since SWCH is at H level, RLC1 is sent to the switch circuit 42 and the selection circuit 4 without going through the memory 43.
6 and output as RLCD. When the output of the run-length code C7 is finished, the run-length code generator 84 generates RCE1, and the selection circuit 40
SWCH is at H level after receiving RCE1, so use this
Output as RLCE. The flip-flop 44 is
It 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 the contents of the memory 43 are completely read out and become empty, the memory 43 generates MEMP, which resets the flip-flop 44 and sets REDM to L level to stop reading the memory 43. At k=19, the switch signal generation circuit 41 receives MEMP,
Based on COU1=0, COU0=1 (see Table 21)
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,
Since M i =1, no run length code is generated and the counter 83 is counted up. At k=21, e i =0, M i =1, COU1=2,
The time chart in Fig. 11 ends with COU0 = 1, but at that time M i = 0 and M i = 1
The counters 83 and 87 are counting the run lengths for both, and the actual operation continues, but is not shown in FIG. This concludes the explanation of the encoding device,
Next, the decoding device will be explained. FIG. 12 shows a block diagram of a device showing a concrete example of the decoding method of the present invention. In FIG. 12, the decompression decoding circuit 18 inputs the prediction error encoded signal 45, decompresses it, and outputs it as a prediction error signal 47, and the prediction decoding circuit 19 inputs the prediction error signal 47, decodes it predictively, and decodes it. It is output as an image signal 48. 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 receives a clock signal,
Controls each circuit by sending out control signals and synchronization signals.
An example of the predictive decoding circuit 19 for an 8-value (0 to 7) multi-value image signal (3 bits per pixel) is shown in the first example.
Shown in Figure 3. To simplify the explanation, in this example, the image signal S used for prediction is the four pixels a, a, and
Suppose it consists of b, c, and d. In addition, each pixel is expressed with 3 bits and levels 0, 1...
...7 is (0,0,0), (0,0,1),...
Assume 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 multivalued image signal having an even larger number of levels. In the predictive decoding circuit 19, the already decoded image signal is 3(l+
2) Bits are set in the shift register 28 as shown in FIG. Here, l represents the number of pixels per main running line. 1st mode signal determination
The ROM 23 receives 4 pixels a, b, c, and d (3 bits for each pixel) as address data, and outputs a mode signal M 1 (1 bit) based on the address data. 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 M 1 , decompresses and decodes the prediction error signal e 1 corresponding to M 1 , and applies it to the prediction decoding circuit 19 . The expansion decoding circuit 18 generates a prediction error signal e i 47 corresponding to the input mode signal M i
The predictive decoding circuit 19 performs decompression decoding from the compressed code.
Add to. In the prediction decoding circuit 19, the prediction error signal e i 47 is added as address data to the second mode signal generation ROM 24 together with the already decoded reference image signals a, b, c, d (3 bits each). The ROM 24 generates a second mode signal M 2 based on this address data and applies it to the selection circuit 27. The selection circuit 27 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 . Decompression decoding circuit 18 receives M 3 and M 3
The prediction error signal e 3 corresponding to is applied to the prediction decoding circuit 19 as e i . In the prediction decoding circuit 19, the prediction error signal e 3 47 is sent to the level signal selection circuit 5.
0 as a control signal, until now ROM25
The prediction error signal e 2 corresponding to the mode signal M 2 applied to the register 21 is set to the register 21, and the prediction error signal e 1 corresponding to the mode signal M 1 set to the register 21 is set to the register 22. . And the contents e 1 and e 2 of registers 21 and 22 are e 3
Similarly, it is applied as a control signal to the level signal selection circuit 50. As a result, prediction error signals e 1 , e 2 , e 3 corresponding to mode signals M 1 , M 2 , M 3 are applied to the level signal selection circuit 50 as control signals e=(e 1 , e 2 , e 3 ). The ranking determination ROM 26 inputs the decoded image signals a, b, c, d as address data, and outputs the ranked level signals α 1 , α 2 , . . .
Eight α 8 (3 bits each) are outputted and added to the level signal selection circuit 50 as input data. The level signal selection circuit 50 selects α i, that is, α e+1, from among α 1 , α 2 , . and sets it in the register 28 as the decoded image signal x. Here, e is considered to be a binary number with e 1 as MSB and e 3 as LSB. When register 28 receives x, it shifts the stored data by one pixel and prepares for the decoding operation of the next pixel. ROMs 23, 24, 2 for generating first, second, and third mode signals of the predictive decoding circuit 19
5. The ranking determination ROM 26 is the first, second, and third mode signal generation ROM 15, 1 of the predictive encoding circuit 2.
6, 17, is exactly the same as ranking determination ROM9. Next, the decompression/decoding circuit 18 will be explained. The prediction error decoding circuit 18 is roughly divided into two parts, upper and lower, as shown in FIG. The upper part
This 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 =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, and receives the mode signal where M i =0. The upper circuit operates, and when it receives a mode signal of M i =1, the following circuit operates. buffer memory 2
9, the prediction error coded signal RCLD45 is run-length coded and stored, and it is stored as M i =
When it is 1, it is read out when there is a request from the run-length decoding circuit 31, and when M i =0, it is read out when there is a request from the run-length decoding circuit 32. The run length decoding circuit 31 has M i =1
This circuit decodes the prediction error coded signal RLC1 for the input signal RLC1, 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, it reads out the prediction error coded signal RLC1 from the buffer memory 29 via the switch circuit 30, decodes it, sets the obtained run length in the counter 35, and outputs the decoding end signal RDE1. Output. Counter 35 is a countdown enable signal
Counts down when ENB1 is H and contents CON1
When becomes 0, the output of the prediction error signal generation circuit 37 is set to H level (“1”). The counter 35 further counts down, and when the content CON1 becomes -1, the decoding start signal generation circuit 33 outputs a pulse signal.
RDS1 is generated to start the operation of the run length decoding circuit again. The flip-flop 67 is set by inputting the decoding start signal RDS1 via the OR circuit 65, and ORing the decoding end signal RDE1.
It is input via circuit 66 and reset. At this time, the output DECD of the flip-flop 67 indicates that the run-length decoding circuit 31 is in the decoding operation. The delay circuit 68 delays the DECD signal by one clock and outputs the delayed signal. Delay circuit 68
The output of is inverted by NOT circuit 68 and output as countdown enable signal ENB to AND circuit 6
Add to 1,62. ENB, M i is H level (“1”)
At this time, ENB1 becomes H level and the counter 35 counts down. When ENB is at the H level and M i is at the L level (“0”), ENB0 goes to the H level and the counter 36 counts down. The circuit at the bottom of FIG. 14 decodes the prediction error coded signal RLC0 for M i =0. The signals RDS0, RDE0, CON0, ENB0, the run length decoding circuit 32, the counter 36, the decoding start signal generating circuit 34, and the prediction error signal generating circuit 60 are the signals in the circuit for M i =1.
RDS1, RDE1, CON1, ENB1, run length decoding circuit 31, counter 35, decoding start signal generation circuit 33, prediction error signal generation circuit 37
It works in the same way. Following the time chart of FIG. 15, the prediction error decoding circuit 19 of FIG.
Explain the operation. In Fig. 15, k written on the top row is the mode signal written below it.
Indicates the order in which M i was input. The prediction error signal e i corresponding to the mode signal M i is k=2,
There are times when M i is output immediately after input, such as when k=1, 3, 6, etc., but there are times when it is output after waiting for a while, as when k=1, 3, 6, etc. 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. No waiting time
When e i is output, the run-length code corresponding to e i has already been decoded. The prediction error decoding circuit 19 starts operating when k=1. At the start of operation, ENB is at H level,
DECD is the content of L level counters 35 and 36
CON1 and CON0 are initialized to 0. At the start of operation, since ENB is at H level, M i
When = 1, ENB1 becomes H level and the counter 35 counts down, and when M i = 0,
ENB0 becomes H level and the counter 36 counts down. In Figure 15, when k=1, M i
=1, so the counter 35 counts down and its content CON1 becomes -1. Since CON1 is -1, the decoding start signal generating circuit 33 issues the signal RDS1 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.
The flip-flop 68 is reset via the OR circuit 66, and the signal DECD is brought to L level to notify the end of decoding. The prediction error signal generation circuit 37 receives the decoding result "3" of C1 set in the counter 35 as a signal CON1, generates a signal e i (1)=0, and outputs the signal e i (1)=0 via the selection circuit 64 as the prediction error signal e i Output as . Run length decoding circuit 31 is operating
The DECD signal is at H level. And since the ENB signal is at L level one clock later,
The decoding result is set in the counter 35 from one clock after the run-length decoding circuit 31 starts operating until e i is output based on the decoding result, that is, until the next mode signal M i is input. countdown is prohibited. In addition,
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 Figure 15, k=
2, M i = 1, ENB is H level, so ENB1
is at H level, the counter 35 counts down and its content CON1 becomes 2. CON1 is 2
Therefore, the prediction error signal generation circuit 37 generates a signal e i (1)=0 and outputs this via the selection circuit 64 as the prediction error signal e i . When k=1, there was a waiting time for the output of e i during the operation of the run-length decoding circuit 31 after inputting the mode signal M i (during 3 clocks in FIG. 15), but when k=2, Even if the run length decoding circuit 31 or 32 does not operate, the counter 35
The prediction error signal e i
can occur immediately 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, ENB is H
Because of the level, ENB2 is at H level, the counter 36 is counted down, and its contents CON0
becomes -1. Since CON0 is -1, the decoding start signal generating circuit 34 generates the signal RDS0 and starts the operation of the run length decoding circuit 32. Further, RDS0 sets the flip-flop 67 via the OR circuit 65 and sets the signal DECD to H level. The run-length decoding circuit 32 starts operating, inputs the run-length code C2 as RLC0 from the buffer memory via the switch circuit 30, and decodes it. When the run-length decoding circuit 32 finishes decoding the run-length code C2, it sets the result in the counter 36, emits 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 decoding. . The prediction error signal generation circuit 60 generates a signal when the decoding result "2" of C2 is set in the counter 36.
A received signal e i (0)=0 is generated as CON0, and this is outputted as a prediction error signal e i via the selection circuit 64. Run length decoding circuit 32 is operating
The DECD signal is at H level. And since the ENB signal is at L level one clock later,
One clock after the run-length decoding circuit 32 starts operating, the decoding result is set in the counter 36, and based on it, the counter 35 counts down until e i is output, that is, until the next mode signal M i is input. is prohibited. Above, k=
This concludes the explanation for step 3. The same operation continues for k=4 to 21, and the run length code C3
, C10 is decoded and a prediction error signal e i corresponding to each mode signal M i is generated. In the multilevel image signal encoding device of the present invention, the operation of the compression encoding circuit 4 of FIG. 10 will be explained with reference to the time chart of FIG. It was assumed that it would occur. 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 multilevel image signal decoding apparatus 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 ) values, the prediction error signal e is n of e 1 , e 2 , ..., e o (1 bit each).
The method of connecting e i and the definition of run are the same as in the case of 8 values. As described in detail above, according to the encoding device and decoding device of the present invention, it is possible to efficiently encode and decode a multilevel image signal using a run-length encoder and a decoder.

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

第1図は参照画素と被予測画素の位置関係を示
す図、第2図は従来の予測法を用いた予測符号化
回路図、第3図、第4図、第7図は画像信号の条
件付発生確率の1例を示す図、第5図は本発明の
符号化方式を具体的にした一例を示す装置のブロ
ツク図、第6図は本発明の符号化方色に用いられ
る予測符号化回路の1例を示すブロツク図、第8
図、第9図は予測誤差信号の符号化順序を説明す
る図、第10図は本発明の符号化方式に用いられ
る圧縮符号化回路の1例を示すブロツク図、第1
1図は第10図の予測誤差符号化回路のタイムチ
ヤート、第12図は本発明の復号化方式を具体的
にした一例を示す装置のブロツク図、第13図は
本発明の復号化方式に用いられる予測復号化回路
の1例を示すブロツク図、第14図は本発明の復
号化方式に用いられる予測誤差復号化回路の1例
を示すブロツク図、第15図は第14図の予測誤
差復号化回路の1例を示すブロツク図である。 図において、1,48…多値画像信号、2…予
測符号化回路、3,47…予測誤差信号、4…圧
縮符号化回路、5,45…符号化予測誤差信号、
6,20…制御回路、7,10,28…3(l+
2)ビツトシフトレジスタ、8,26…順位決定
用ROM、9…順位信号選択回路、11…予測信
号決定用ROM、12,13,14…排他的論理
和回路、15,23…第1モード信号決定用
ROM、16,24…第2モード信号決定用
ROM、17,25…第3モード信号決定用
ROM、18…伸長復号化回路、19…予測復号
化回路、21,22…1ビツトレジスタ、27,
40,46,76,77…選択回路、31,32
…ランレングス復号化回路、29…バツフアメモ
リ、35,36,83,87…カウンタ、33,
34…ランレングス復号化回路スタート信号発生
器、30,42…スイツチ回路、37,60…予
測誤差信号発生回路、38,39…3ビツトレジ
スタ、41…スイツチ信号発生回路、43…ラン
レングス符号メモり、44,57,58,67…
フリツプフロツプ、50…レベル選択回路、5
2,65,66…OR回路、61,62,81,
82,93,94…AND回路、63,69,7
8,79,80…NOT回路、68…デイレイ回
路、86,90…ラン終了検出回路、84,88
…ランレングス符号発生器。
Figure 1 is a diagram showing the positional relationship between a reference pixel and a predicted pixel, Figure 2 is a predictive coding circuit diagram using a conventional prediction method, and Figures 3, 4, and 7 are image signal conditions. FIG. 5 is a block diagram of a device showing a specific example of the encoding method of the present invention, and FIG. 6 is a predictive encoding used in the encoding method of the present invention. Block diagram showing one example of the circuit, No. 8
9 is a diagram explaining the coding order of prediction error signals, and FIG. 10 is a block diagram showing an example of a compression encoding circuit used in the encoding method of the present invention.
Fig. 1 is a time chart of the prediction error encoding circuit of Fig. 10, Fig. 12 is a block diagram of a device showing a concrete example of the decoding method of the present invention, and Fig. 13 is a time chart of the prediction error encoding circuit of Fig. 10. FIG. 14 is a block diagram showing an example of a prediction error decoding circuit used in the decoding method of the present invention. FIG. 15 is a block diagram showing an example of the prediction error decoding circuit used in the decoding method of the present invention. FIG. 2 is a block diagram showing an example of a decoding circuit. In the figure, 1, 48...multivalued 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, 10, 28...3(l+
2) Bit shift register, 8, 26...ROM for ranking determination, 9...rank signal selection circuit, 11...ROM for predicting signal determination, 12, 13, 14...exclusive OR circuit, 15, 23...first mode signal For decision
ROM, 16, 24...For determining second mode signal
ROM, 17, 25...For determining the third mode signal
ROM, 18... Decompression decoding circuit, 19... Prediction 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, 33,
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 memo ri, 44, 57, 58, 67...
Flip-flop, 50...Level selection circuit, 5
2, 65, 66...OR circuit, 61, 62, 81,
82, 93, 94...AND circuit, 63, 69, 7
8,79,80...NOT circuit, 68...Delay circuit, 86,90...Run end detection circuit, 84,88
...run-length code generator.

Claims (1)

【特許請求の範囲】 1 すでに入力ずみの画像信号Sに基づき次に入
力される画像信号xの実際の信号値が何番目の予
測値に一致するかその順位を検出し、前記順位に
対応する複数の予測誤差信号を発生して前記画像
信号xを予測符号化し、前記各予測誤差信号が0
である確率の高さを示すモード信号をS及び圧縮
符号化ずみの予測誤差信号に基づき発生し、前記
各予測誤差信号をそれに対応する各モード信号に
基づきグループ分けした後に圧縮符号化する多値
画像信号符号化方式と、すでに伸長及び予測復号
化ずみの画像信号S及び伸長復号化ずみ予測誤差
信号に基づきモード信号を発生しモード信号に対
応する予測誤差信号を圧縮符号から伸長復号化
し、Sと複数の予測誤差信号に基づき画像信号x
を予測復号化する多値画像信号復号化方式とから
なることを特徴とする多値画像信号の符号化復号
化方式。 2 すでに入力ずみのN(2n-1<N2n)値の画
像信号Sに基づき、次に入力される画像信号xを
予測するN個の信号値を予測的中率順に並べる手
段と前記画像信号xの実際の信号値が前記並べら
れた信号値の何番目に一致するかその順位を検出
する手段と、前記順位に対応する高々n個の予測
誤差信号ei(1in)を発生して前記画像信
号xを予測符号化する手段と、前記各予測誤差信
号ei(1in)が0である確率の高さを示す
モード信号Miを、i=1のときはSのみに基づ
き発生し、2inのときはS及びi−1個の
予測誤差信号ej(1ji−1)に基づき発生
する手段と、前記各予測誤差信号ei(1in)
をそれに対応する各モード信号Mi(1in)
に基づきグループ分けした後に圧縮符号化する手
段とを有することを特徴とする多値画像信号符号
化装置。 3 すでに伸長及び予測復号化ずみのN(2n-1
N2n)値の画像信号Sに基づきモード信号M1
を発生し、モード信号M1に対応する予測誤差信
号e1を圧縮符号から伸長復号化する手段と、iが
2以上かつ高々nのときモード信号MiをS及び
i−1個の予測誤差信号ej(1ji−1)に
基づき発生しモード信号Miに対応する予測誤差
信号eiを圧縮符号から伸長復号化する手段と、S
と高々n個の予測誤差信号ei(1in)に基
づきN値画像信号xを予測復号化する手段とを有
することを特徴とする多値画像信号復号化装置。
[Claims] 1. Detecting the order in which the actual signal value of the next input image signal x matches the predicted value based on the already input image signal S, and detecting the order corresponding to the order. The image signal x is predictively encoded by generating a plurality of prediction error signals, and each prediction error signal is 0.
A mode signal indicating a high probability of is generated based on S and a compression-encoded prediction error signal, and each prediction error signal is compressed and encoded after being grouped based on the corresponding mode signal. A mode signal is generated based on the image signal encoding method, the image signal S that has already been expanded and predictively decoded, and the expansion and decoded prediction error signal, and the prediction error signal corresponding to the mode signal is expanded and decoded from the compression code, and S and the image signal x based on multiple prediction error signals
1. A multi-value image signal encoding and decoding method comprising: a multi-value image signal decoding method that performs predictive decoding. 2. Means for arranging N signal values for predicting the next input image signal x based on the already input image signal S of N (2 n-1 <N2 n ) values in order of prediction accuracy; means for detecting the order in which the actual signal value of the signal x matches among the arranged signal values; and generating at most n prediction error signals e i (1in) corresponding to the order. means for predictively encoding said image signal , 2in, means for generating based on S and i-1 prediction error signals e j (1ji-1), and each prediction error signal e i (1in)
and the corresponding mode signal M i (1in)
1. A multivalued image signal encoding device comprising means for compressing and encoding after grouping based on. 3 N (2 n-1 <
Based on the image signal S of N2 n ) value, the mode signal M 1 ,
means for decoding and decoding a prediction error signal e 1 corresponding to the mode signal M 1 from the compressed code, and when i is 2 or more and at most n, the mode signal M means for expanding and decoding a prediction error signal e i generated based on the signal e j (1ji-1) and corresponding to the mode signal M i from a compressed code;
and means for predictively decoding an N-valued image signal x based on at most n prediction error signals e i (1 inch).
JP15034979A 1979-11-20 1979-11-20 Coding and decoding system for multivalue video signal and its device Granted JPS5673975A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP15034979A JPS5673975A (en) 1979-11-20 1979-11-20 Coding and decoding system for multivalue video signal and its device
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
JP15034979A JPS5673975A (en) 1979-11-20 1979-11-20 Coding and decoding system for multivalue video signal and its device

Publications (2)

Publication Number Publication Date
JPS5673975A JPS5673975A (en) 1981-06-19
JPS6364949B2 true JPS6364949B2 (en) 1988-12-14

Family

ID=15495042

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15034979A Granted JPS5673975A (en) 1979-11-20 1979-11-20 Coding and decoding system for multivalue video signal and its device

Country Status (1)

Country Link
JP (1) JPS5673975A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5930366A (en) * 1982-08-12 1984-02-17 Mitsubishi Electric Corp Device for encoding picture
JPS5937774A (en) * 1982-08-26 1984-03-01 Nec Corp Method and device for encoding picture signal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5624877A (en) * 1979-08-06 1981-03-10 Nec Corp Coder for multi-video signal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5624877A (en) * 1979-08-06 1981-03-10 Nec Corp Coder for multi-video signal

Also Published As

Publication number Publication date
JPS5673975A (en) 1981-06-19

Similar Documents

Publication Publication Date Title
JPH08265800A (en) Compression method, expansion method, parallel context modeller, parallel entropy coder, parallel entropy decoder, picture compression device and picture expansion device
JP4522199B2 (en) Image encoding apparatus, image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JPH0211064B2 (en)
JPH0969951A (en) Encoding method and decoding method
JPS5831791B2 (en) Image information band compression transmission device
JPH0424907B2 (en)
JPH04270564A (en) Serial picture data compression system having color information
JPS6364949B2 (en)
JPS6364948B2 (en)
US6987891B2 (en) Image display device
JP2634793B2 (en) Color image signal encoding device
JPH0779415B2 (en) Decompression method of compressed data
JPS6326587B2 (en)
JPH05151349A (en) Image data compressing method and encoding circuit
JPH0723238A (en) Picture data compression and decoding device
JP3433276B2 (en) Image signal compression method and apparatus, image signal decompression method and apparatus, image signal compression / decompression method and apparatus, and printer
JP2812064B2 (en) Image processing device
JP2615215B2 (en) Image data compression method
JPS6326586B2 (en)
JPH04270569A (en) Data compression system for picture processor
JP2809161B2 (en) Predictive coding device
JP3123795B2 (en) Encoding device and decoding device using arithmetic code
JP2512195B2 (en) Encoding device and decoding device
JP3862590B2 (en) Image processing apparatus and method, computer program, and computer-readable storage medium
JPH09135357A (en) Decoder for color image signal