JPH0366861B2 - - Google Patents
Info
- Publication number
- JPH0366861B2 JPH0366861B2 JP56034888A JP3488881A JPH0366861B2 JP H0366861 B2 JPH0366861 B2 JP H0366861B2 JP 56034888 A JP56034888 A JP 56034888A JP 3488881 A JP3488881 A JP 3488881A JP H0366861 B2 JPH0366861 B2 JP H0366861B2
- Authority
- JP
- Japan
- Prior art keywords
- signal
- prediction error
- code
- image signal
- prediction
- 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 - Lifetime
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/41—Bandwidth or redundancy reduction
- H04N1/411—Bandwidth or redundancy reduction for the transmission or storage or reproduction of two-tone pictures, e.g. black and white pictures
- H04N1/413—Systems or arrangements allowing the picture to be reproduced without loss or modification of picture-information
- H04N1/417—Systems or arrangements allowing the picture to be reproduced without loss or modification of picture-information using predictive or differential encoding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Image Processing (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Transmission Systems Not Characterized By The Medium Used For Transmission (AREA)
Description
本発明は、画像信号を高能率に圧縮符号化する
画像信号符号化装置に関する。
従来の画像信号符号装置の代表的なものに
DPCM符号化装置がある。これは入力ずみの画
像信号S(これを以後参照画像信号と呼ぶ)を用
いて現在入力中の画像信号x(これを以後現画像
信号と呼ぶ)の予測信号x^を定め、その予測誤差
信号eをxとx^の差
e=x−x^ (1)
によつて定め、予測誤差信号eが0周辺の小さな
値に集中する傾向のあることを利用して圧縮符号
化するものである。現画像信号xに対し参照画像
信号Sをたとえば第1図の3画素a,b,cに選
んだ場合についてこれをもう少し詳しく説明す
る。第1図で点線は主走査線を示し、これに沿つ
て左から右へ画像は走査される。そして右端に到
達するとその一つ下の主走査線に沿つてその左端
から走査が続けられる。画像信号は走査順に符号
化装置に入力される。予測信号x^をS=(a,b,
c)によつて定める方法は種々考えられるが、
x^=k1a+k2b+k3c (2)
のように参照画像信号Sに属する画素a,b,c
の線型結合で定めることが多い。k1,k2,k3は定
数で予測係数と呼ばれ、予測誤差信号eが0周辺
の小さな値に集中するように定められる。たとえ
ば、eの2乗平均値
<e2>AV=<x−x^)2>AV
=<(x−k1a−k2b−k3c)2>AV (3)
を小さくなるように定められる。このようにして
定められた予測誤差信号eは、第2図のような0
集中型の確率分布P(e)に従うので、これを利用し
て圧縮符号化される。第3図に従来のDPCM符
号化における予測誤差信号eに対する符号の長さ
L(e)をす。第3図のごとく高い発生確率を有する
小さな信号値の予測誤差信号eに対しては短い符
号が、低い発生確率を有する大きな信号値の予測
誤差信号eに対しては長い符号が割合てられる。
予測誤差信号eの発生確率分布はより詳しく考え
ると参照画像信号Sによつて異なり、各Sごとに
P(e|S)なる発生確率分布であると考えられ
る。ここでP(e|S)は条件Sのもとでのeの
発生確率分布で、Sごとに異なる分布である。先
に説明した第2図のP(e)はP(e|S)をSにつ
いて平均したもの
P(e)=
〓S
ΣP(e|S)P(S) (4)
である。ここでP(S)は参照画像信号Sの発生
確率であり、
ΣS
はすべてのSについての総和を意
味する。(4)式は各SについてのP(e|S)をS
の発生確率で重みを付けて平均したものがP(e)で
あることを示す。具体例を上げて、P(e|S)
とP(e)の違いについて説明しよう。参照画像信号
Sは第1図の(a,b,c)3画素からなり、画
像信号は0〜15の16値(4ビツト/画素)とす
る。予測係数k1,k2,k3は0.7,0.2,0.1に選んだ
としよう。Sが
S1=(8,8,8) (5)
のとき、予測信号は
x^=0.7×8+0.2×8+0.1×8=8 (6)
である。S=S1のとき現画像信号xの周囲の3画
素a,b,cすべてが8であり、xは画像の平坦
部にあると考えられ、xは8及びそれに近い7,
6になる場合が非常に多い。それゆえS=S1のと
き予測誤差信号eの発生確率分布P(e|S1)は
第4図のように0,±1にほとんど集中する鋭い
分布になる。
一方Sが
S2=(8,11,5) (7)
のとき、予測信号は
x^=0.7×8+0.2×11+0.1×5=8 (8)
である。ただしここで計算結果の少数点以下を四
捨五入した。S=S2のときxの周囲3画素a,
b,cは11,8及び5とその信号値は大きく変化
し、xは画像のエツジ部にあると考えられる。こ
のときxは11から5の間の信号値(eは+3から
−3)をとる場合が多いとは考えられるが、特に
非常に大きな確率で発生する信号値はない。それ
ゆえS=S2のとき予測誤差信号eの発生確率分布
P(e|S2)は第5図のように、幅広く広がるな
だらかな分布となる。このようにP(e|S)の
型はSによつて大きく異なる。P(e|S)をP
(s)によつて重み付け平均をした、いわば平均
的なP(e|S)が第2図のようなP(e)である。
それゆえP(e)は、P(e|S1)よりはなだらかだ
がP(e|S2)よりは鋭い分布である。従来の
DPCM符号化では、eの発生確率分布はP(e)で
あるとしてeを符号化しており、Sによつてeの
発生確率分布が前述のように変化することを全く
考慮に入れてない。それゆえSによつては第3図
で与えられる符号の長さL(e)が適切でない場合が
しばしばあり圧縮率の低い欠点があつた。
本発明の目的は、このような欠点を除いた高い
圧縮率を有する画像信号符号化装置を提供するこ
とにある。
本発明によれば、入力多値画像信号の予測誤差
信号を1画素ごとに複数のグループにグループ分
けし、グループごとに異なる不等長符号によつ
て、1画素ごとに不等長符号化する画像信号符号
化装置であつて、すでに入力ずみの画像信号sを
用いて現在入力中の多値画像信号xの予測信号x^
を発生する手段と、多値画像信号xの予測誤差信
号eを発生する手段と、前記画像信号sの変化の
程度を用いて前記予測の当たる程度を示すモード
信号Mを発生する手段と、前記予測誤差信号eを
前記モード信号Mの信号値によつてグループ分け
し、各グループ別に、各グループにおける予測誤
差信号eの発生確率分布にしたがつて定められた
不等長符号のセツトを用いて予測誤差信号eを不
等長符号化する手段を有することを特徴とする画
像信号符号化装置が得られる。
本発明を用いることにより効率よく画像信号を
符号化することができる。
以下図面を用いて本発明を詳しく説明する。画
像信号は0から15の16値(4ビツト/画素)で、
参照画像信号Sが第1図の3画素a,b,cから
なる場合を例に上げて説明することにする。まず
第1の実施例について説明する。第6図は本発明
の符号化装置の第1の実施例に対するブロツク図
の一例である。第6図において画像信号(4ビツ
ト/画素)は4(l+2)ビツトのシフトレジス
タ1に順次入力される。ここでlは一主走査線当
りの画素数であり、シフトレジスタ1には1ライ
ン+2画素の画像信号が貯えられる。シフトレジ
スタ1に現在入力されたばかりの画素がx、その
直前に入力されたものがa、(l−1)画素前に
入力されたものがc,l画素すなわち1ライン前
に入力されたものがbである。予測信号発生器2
はシフトレジスタ1により参照画像信号S=(a,
b,c)を入力し、たとえば(2)式のようにa,
b,cの線型演算でxの予測信号x^を作成し出力
する。減算器3は、予測信号発生器2よりx^を、
シフトレジスタ1よりxを入力し、それの差分信
号((1)式参照)を求め出力する。これがxの予測
誤差信号eである。モード信号発生器4は、シフ
トレジスタ1より参照画像信号S=(a,b,c)
を入力し、モード信号Mを出力する。モード信号
Mは0と1の2通りの値をとり、M=0は予測誤
差信号eが0に集中する程度の高いことを、M=
1は逆に0に集中する程度の低いことを示す。す
でに詳しく説明したように、eはSによつてその
発生確率分布P(e|S)は大きく異なる。そこ
でS=S1のようにP(e|S)が0に鋭く集中す
るものをタイプ、逆にS=S2のようにP(e|
S)がなだらかな山型を示すものをタイプと名
付け、Sをタイプとタイプに二分類する。す
なわちP(e|S)の0集中度の高いものがタイ
プ、低いものがタイプである。
モード信号発生器4はこの分類に従つてタイプ
のSに対してはM=0を、タイプのSに対し
てはM=1を発生し、予測誤差信号符号化回路5
に加える。予測誤差信号符号化回路5はMの信号
値によつて異なる動作をする。すなわちM=0の
ときには、予測誤差信号符号化回路5は、Sがタ
イプのときの予測誤差信号e(以後タイプの
eと呼ぶ)にマツチした符号を発生し、M=1の
ときにはSがタイプのときの予測誤差信号e
(以後タイプのeと呼ぶ)にマツチした符号を
発生する。タイプのeの発生確率分布は、P
(e|S)とSの発生確率P(S)を用いて
P〓(e)=
〓SI
P(e|S)P(S) (9)
で与えられる。ここで
〓SI
はタイプのS
についての総和を意味する。P〓(e)はP(e|S1)
のごとく0に鋭く集中するタイプの分布を集め
て平均したものであるからやはり第7図のごとく
0に鋭く集中する分布である。M=0のとき予測
誤差信号符号化回路5は、eが0に鋭く集中する
分布P〓(e)に従うことを利用してこれを符号F〓(e)
によつて圧縮符号化する。第8図に符号F〓(e)の
長さL〓(e)を示す。L〓(e)は発生確率の非常に高い
0及びそのごとく近くのeに対しては非常に短
く、発生確率の非常に低い0から離れたeに対し
ては非常に長くしてある。一方タイプのeの発
生確率分布は、P(e|S)とSの発生確率分布
P(S)を用いて
P〓(e)=
〓SH
P(e|S)P(S) (10)
で与えられる。ここで
〓SH
はタイプのS
についての総和を意味する。P〓(e)はP(e|S2)
のごとく0を中心とするなだらかな山型のタイプ
の分布を集めて平均したものであるからやはり
第9図のごとく0を中心とするなだらかな山型の
分布である。M=1のとき予測誤差信号符号化回
路5は、タイプのeが0を中心とするななだら
かな山型分布P〓(e)に従うことを利用してこれを
符号F〓(e)によつて圧縮符号化する。第10図に
符号F〓(e)の長さL〓(e)を示す。L〓(e)は発生確率の
比較的高い0及びその周辺のeに対しては比較的
短く、発生確率の比較的低い0から離れたeに対
して比較的長くしてある。第8図と第10図を比
較すればわかるように、L〓(e)はL〓(e)に比べ0周
辺のeに対してはより長く、0から離れたeに対
してはより短い。本発明の特長はこのようにタイ
プ、タイプのeに対しそれぞれに合つた符号
F〓(e),F〓(e)を割合て圧縮符号化の効率を上げる
ことにある。従来のDPCM符号化では、符号長
L(e)(第3図参照)はL〓(e)(第8図参照)とL〓
(e)(第10図参照)の中間の型である。符号長L
(e)はタイプのeに対しても、タイプのeに対
してもその確率分布に適合しないが、両方に対し
てそれほどはずれたものにならないように定めら
れている。それに対して本発明ではタイプのe
に対してL〓(e)、タイプのeに対してはL〓(e)と
それぞれeの発生確率分布にあつた符号長にする
ので、従来のDPCM符号化より効率がよい。従
来のDPCM符号化では、タイプとタイプを
平均した分布に対し、eの符号長を定める。した
がつて従来ののDPCM符号化では、eがタイプ
のときは、eのゼロ集中度が高いにもかかわら
ず、ゼロ付近のeに対する符号がタイプの符号
に比べ長く符号化効率がおちる。また従来の
DPCM符号化では、eがタイプのときは、e
のゼロ集中度が低いにもかかわらず、ゼロから離
れたeに対する符号が、タイプの符号に比べ長
いので、符号化効率がおちる。結局、予測誤差信
号符号化回路5は、M=0のとき符号F〓(e)を、
M=1のとき符号F〓(e)を選択し、出力符号F(e)
とする。
第11図、第12図、第13図はそれぞれ予測
信号発生器2の構成の具体例を示すブロツク図で
ある。第11図の予測信号発生器は、(2)式に対応
した線型予測信号発生器である。第11図では、
乗算器6,7,8によつてa,b,cに予測係数
k1,k2,k3が乗ぜられ、その乗算結果の総和が加
算器9によつて計算されx^として出力される。第
12図の予測信号発生器は、Mの信号値によつて
予測係数k1,k2,k3を変えるものである。これは
M=0ような画像の平坦部と、M=1のうな画像
のエツジ部では、適切な予測係数k1,k2,k3は異
なると考えられるからである。このように変化す
る予測係数を用いれば予測が当りやすくなり、符
号化効率が上がることが期待される。第12図で
は、選択回路10,12,14はM=0とき予測
係数k11,k21,k31を選択し、M=1のとき予測
係数k12,k22,k32を選択する。乗算器11,1
3,15はa,b,cと選択された予測係数との
乗算を行なう。加算器16はそれらの乗算結果の
総和を計算しx^として出力する。第13図の予測
信号発生器は、各参照画像信号S=(a,b,c)
ごと予測信号x^をROM17に記憶しておく方法
である。前述のようにa,b,cの線型演算でx^
を定める方法は簡便であるのでよく用いられる
が、その結果得られるx^は、各Sごとに考えると
かならずしも最適のものであるとは限らない。以
下その理由を考えてみよう。予測係数k1,k2,k3
はたとえば(3)式により2乗平均予測誤差が最小に
なるように定められる。(3)式は次のように考える
ことができる。
<e2>AV=<(x-x^)2>AV
=
ΣS
ΣX
P(x,S)(x-x^)2
=
ΣS
ΣX
P(S)P(x|S)(x-x^)2
=
ΣS
P(S){
ΣX
P(x|S)(x-x^)2}
=
ΣS
P(S){
ΣX
P(x|S)(x-k1a-k2b-k3c)2}
(11)
ここでP(S)は参照画像信号Sの発生確率、
P(x|S)は参照画像信号がSのとき現画像信
号がxになる条件付確率である。
(4)式すなわち(11)式ではすべてのSに渡つての平
均2乗予測誤差を考えている。ところで各Sごと
の平均2乗予測誤差<es 2>AVはこれとは異なり、
<es 2>AV=<(xs−x^s)2>AV
=
ΣX
P(x|S)(x-x^)2
=
ΣX
P(x|S)(x−k1sa−k2sb−k3sc)2
で与えられる。(12)式でe,x,x^,k1,k2,k3に
付けられた添字Sは特に参照画像信号がSのとき
のe,x,x^,k1,k2,k3であることを示す。<es
2>AVが最小になるように各Sごとに予測係数
k15,k25,k35を定めれば、すべてのSについて
の平均2乗予測誤差は
<e2>AV=
ΣS
P(S)<es 2>AV (13)
で与えられる。
明らかに(13)の<e2>AVは(11)の<e2>AVより
小さくなる。しかし(11)では予測係数k1,k2,k3が
Sにかかわらず一定あつたが、(13)では各Sご
とに異なる予測係数k1,k2,k3を与える必要があ
る。すなわち各Sごとに予測係数k1,k2,k3を記
憶して用意しておく必要がある。これは結局各S
ごとに予測信号x^を記憶して用意しておくことと
同じである。そして多くの場合(12)の<es 2>AVを
最小にするx^sは各Sにおいて最も高い確率で発生
するxと同じである。第13図はこの方法による
予測信号発生器の構成を示す。第13図で、
ROM17は参照画像信号S=(a,b,c)を
アドレス信号として入力し、該当するアドレスの
メモリの内容を予測信号x^として出力する。画像
信号が16値(4bit)、参照画像信号Sが3画素a,
b,cからなるときROM17はアドレス12ビツ
ト、出力4ビツトである。第13図の構成は
ROMを必要とするが、以上詳しく説明したよう
に第11図、第12図の構成より予測適中率が高
い。
第14図、第15図、第16図はそれぞれモー
ド信号発生器4の構成を示すブロツク図であり、
種々考えられるがその具体例を3つ示したもので
ある。第14図のモード信号発生器は、参照画像
信号S=(a,b,c)内での画像信号の変化の
程度を
Σ=(a−b)2+(b−c)2+(c−a)2 (14)
と画像信号の差の2乗の総和Σで計り、
M=0:Σ<θ (15)
M=1:Σθ (16)
とΣがある閾値θより小さいときM=0、大きい
ときM=1とするものである。S内で画像信号の
変化が小さいときは画像の平坦部であると考えら
れ、予測が当りやすくP(e|S)は鋭いタイプ
の分布となることが多いのでM=0とする。S
内で画像信号の変化が大きいときは画像のエツジ
部であると考えられ、予測が当りにくくP(e|
S)はなだらかな山型のタイプの分布となるこ
とが多いのでM=1とする。第14図で、減算器
18,19,20はa−b,b−c,c−aの減
算を行ない、乗算回路21,22,23はそれぞ
れの2乗(a−b)2,(b−c)2,(c−a)2を算
出し加算回路24に加える。
加算回路24はそれらの総和Σを計算し閾値回
路25に加える。閾値回路25は総和Σが閾値θ
より小さいときM=0、大きいときM=1のモー
ド信号Mを出力する。
第15図のモード信号発生器は、参照画像信号
S=(a,b,c)内での画像信号の変化の程度
を
DMAX
=Max{(a-b)2,(b-c)2,(c-a)2} (17)
と参照画像信号内の画像信号の差の2乗の最大値
DMAXで計り、
M=0:DMAX<θ (18)
M=1:DMAXθ (19)
とDMAXがある閾値θより小さいときM=0、大
きいときM=1とするものである。第15図で減
算回路26,27,28はa−b,b−c,c−
aの減算を行ない、乗算回路29,30,31は
それぞれの2乗(a−b)2,(b−c)2,(c−
a)2を算出し最大値検出回路32に加える。最大
値検出回路32は、(a−b)2,(b−c)2,(c
−a)2の最大値DMAXを検出し閾値回路33に加
える。閾値回路33はDMAXが閾値θより小さい
ときM=0、大きいときM=1のモード信号を出
力する。
第16図のモード信号発生器は、各参照画像信
号S=(a,b,c)ごとに予測の当りやすさ、
当りにくさをROMに記憶しておき、モード信号
Mとして出力する。予測の当りやすいときはM=
0、当りにくいときはM=1である。第16図で
ROM34は参照画像信号S=(a,b,c)を
アドレス信号として入力し、該当するアドレスの
メモリの内容をモード信号Mとして出力する。画
像信号が16値(4bit)、参照画像信号Sが3画素
a,b,cからなるときROM34はアドレス12
ビツト、出力1ビツトである。第16図の構成は
ROMを必要とするが、予測の当りやすさの基準
を任意に設定できる利点がある。たとえば各参照
画像信号Sごとに求まる平均2乗予測誤差
<e2 s>AV=
Σe
P(e|S)e2 (20)
をその基準に用いることができる。ここでesの添
字Sは、参照画像信号がSのときのeであること
を特に示す。このときモード信号Mは、
M=0:<e2 s>AV<θ (21)
M=1:<e2 s>AVθ (22)
と<e2 s>AVがある値θより小さいとき0、大き
いとき1と定める。また参照画像信号がSのとき
に予測誤差信号が0になる確率P(o|S)を基
準に用いることができる。このときモード信号M
は、
M=0:P(o|S)θ (23)
M=1:P(o|S)< (24)
とP(o|S)がある値θより大きいとき0、小
さいとき1と定める。その他予測の当りやすさの
基準に何をとろうと、それによつて定まる各Sに
対するMの信号値をROM34に書き込んでおき
さえすればよい。もちろん第14図、第15図の
構成のごとく、Σ、DMAXとθを比較してMを定
めることもできる。それぞれの構成において各S
ごとに定まるMをROM34に書いておきさえす
ればよい。
第17図は第6図の予測誤差信号符号化回路5
の一例を示すブロツク図である。画像信号は0か
ら15の16値とした。第17図で、符号ROM37
はモード信号Mと予測誤差信号eをアドレス信号
A5〜A0として入力し、M=0(A6=0)のとき
タイプのeに対する符号F〓(e)をM=1(A6=
1)のときタイプのeに対する符号F〓(e)をQ10
〜Q0に出力する。これはシフトレジスタ39の
バラレルデータ入力端子D10〜D0に加える。符号
長ROM38はモード信号Mと予測誤差信号eを
アドレス信号B6〜B0として入力し、M=0(B6=
0)のとき符号F〓(e)の長さL〓(e)の2の補数をM
=1(B6=1)のとき符号F〓(e)の長さL〓(e)の2の
補数をP3〜P0に出力する。これはカウンタ40
の初期値設定端子C3〜C0に加えられる。シフト
レジスタ39は、パラレルデータ入力端子D10〜
D0に入力した符号F(e)(M=0のときF〓(e),M
=1のときF〓(e))をシリアルデータ出力端SOよ
りD10からD0の順で次々と出力する。このときカ
ウンタ40は符号F(e)の長さL(e)(M=0のとき
L〓(e),M=1のときL〓(e))をカウントし、シフ
トレジスタ39がL(e)ビツトだけSOより符号を
出力したならばそのシフト動作をそこで停止さ
せ、次の符号データをパラレルデータ入力端子よ
り入力させる。第1表から第4表に符号ROM3
7、符号長ROMの内容の一例を示す。第1表と
第2表はM=0(A6=0)に対するものであり、
第3表と第4表はM=1(A6=1)に対するもの
である。符号ROM37は11ビツトの出力データ
端子Q10〜Q0を有する。の出力データ端子のビツ
ト数はF(e)の最長符号長により定められる。符号
F(e)の長さが最長符号長11ビツトより短いときは
Q10からQ0方向に順に符号F(e)が格納されてい
る。たとえば第1表でROMアドレスが2のとき
符号ROM出力データは1101であるがこれは、
Q10=1,Q9=1,Q8=0,Q7=1を意味し、
Q6〜Q0は空であり何が格納されていてもよい。
ROMアドレス欄には、A5〜A0(B5〜B0と同
じ)をA5をMSB、A0をLSBとした2進数と考え
たときの値を10進数表現で示してある。ROMア
ドレスが一のとき予測誤差信号eは負数で、A5
〜A0は2の補数表示で負数eを表わす。たとえ
ばROMアドレス−2のときA5〜A0は(111110)2
である。符号長ROM出力データ欄には、符号長
ROM38の出力データP3〜P0を記す。P3〜P0は
符号長L(e)(M=0のときL〓(e)、M=1のとき
L〓(e)の2の補数である。2の補数をとるときP3
〜P0をP3がMSB(符号ビツト)、P0がLSBの2進
数と考える。符号長ROM出力データ欄にはP3〜
P0ををP3がMSB、P0がLSBの符号ビツト無しの
2進数と考えて10進数表示で記した。たとえば13
はP3〜P0=(1101)2を示す。符号長ROM出力デ
ータ欄の( )内に参考のため符号長L(e)(M=
0のときL〓(e)、M=1のときL〓(e))を10進数表
示で示す。
The present invention relates to an image signal encoding device that compresses and encodes an image signal with high efficiency. Typical of conventional image signal encoding devices
There is a DPCM encoding device. This uses the input image signal S (hereinafter referred to as the reference image signal) to determine the prediction signal x^ of the currently input image signal x (hereinafter referred to as the current image signal), and the prediction error signal e is determined by the difference between x and x^, e=x−x^ (1), and compression encoding is performed by taking advantage of the fact that the prediction error signal e tends to concentrate at small values around 0. . A case where, for example, three pixels a, b, and c in FIG. 1 are selected as the reference image signal S for the current image signal x will be explained in more detail. In FIG. 1, the dotted line indicates the main scanning line, along which the image is scanned from left to right. When the right end is reached, scanning continues from the left end along the main scanning line one line below. Image signals are input to the encoding device in scanning order. The predicted signal x^ is expressed as S=(a, b,
There are various ways to determine c), but pixels a , b, c belonging to the reference image signal S are
It is often determined by a linear combination of k 1 , k 2 , and k 3 are constants called prediction coefficients, and are determined so that the prediction error signal e concentrates on small values around 0. For example, if the root mean square value of e <e 2 > AV = <x-x^) 2 > AV = < (x-k 1 a-k 2 b-k 3 c) 2 > AV (3) is stipulated by. The prediction error signal e determined in this way is 0 as shown in FIG.
Since it follows the centralized probability distribution P(e), it is compressed and encoded using this. FIG. 3 shows the code length L(e) for the prediction error signal e in conventional DPCM encoding. As shown in FIG. 3, a short code is assigned to a prediction error signal e having a small signal value with a high probability of occurrence, and a long code is assigned to a prediction error signal e having a large signal value having a low probability of occurrence.
When considered in more detail, the occurrence probability distribution of the prediction error signal e is considered to be different depending on the reference image signal S, and to be an occurrence probability distribution of P(e|S) for each S. Here, P(e|S) is the occurrence probability distribution of e under condition S, and is a different distribution for each S. P(e) in FIG. 2 described above is the average of P(e|S) with respect to S, P(e)= 〓 S ΣP(e|S) P(S) (4). Here, P(S) is the probability of occurrence of the reference image signal S, and Σ S means the sum of all S's. Equation (4) expresses P(e|S) for each S as S
It shows that P(e) is weighted and averaged by the probability of occurrence of . Give a concrete example, P(e|S)
Let me explain the difference between and P(e). The reference image signal S consists of three pixels (a, b, c) in FIG. 1, and the image signal has 16 values from 0 to 15 (4 bits/pixel). Suppose that the prediction coefficients k 1 , k 2 , and k 3 are chosen to be 0.7, 0.2, and 0.1. When S is S 1 =(8,8,8) (5), the predicted signal is x^=0.7×8+0.2×8+0.1×8=8 (6). When S=S 1 , all three pixels a, b, c around the current image signal x are 8, and x is considered to be in the flat part of the image, and x is 8 and 7,
Very often it's 6. Therefore, when S=S 1 , the occurrence probability distribution P(e|S 1 ) of the prediction error signal e becomes a sharp distribution that almost concentrates on 0 and ±1 as shown in FIG. On the other hand, when S is S 2 = (8, 11, 5) (7), the predicted signal is x^ = 0.7 x 8 + 0.2 x 11 + 0.1 x 5 = 8 (8). However, here the calculation results were rounded off to the nearest whole decimal point. When S=S 2 , 3 pixels around x a,
The signal values of b and c vary greatly as 11, 8, and 5, and x is considered to be at the edge of the image. At this time, it is thought that x often takes a signal value between 11 and 5 (e is +3 to -3), but there is no signal value that occurs with a particularly high probability. Therefore, when S=S 2 , the occurrence probability distribution P(e|S 2 ) of the prediction error signal e becomes a wide and gentle distribution as shown in FIG. In this way, the type of P(e|S) differs greatly depending on S. P(e|S) as P
The so-called average P(e|S) obtained by weighting the average by (s) is P(e) as shown in FIG.
Therefore, P(e) has a distribution that is gentler than P(e|S 1 ) but sharper than P(e|S 2 ). Traditional
In DPCM encoding, e is encoded on the assumption that the occurrence probability distribution of e is P(e), and the fact that the occurrence probability distribution of e changes depending on S as described above is not taken into consideration at all. Therefore, depending on S, the code length L(e) given in FIG. 3 is often not appropriate, resulting in a disadvantage of low compression ratio. An object of the present invention is to provide an image signal encoding device that eliminates such drawbacks and has a high compression rate. According to the present invention, a prediction error signal of an input multilevel image signal is divided into a plurality of groups for each pixel, and each pixel is unequal-length coded using a different unequal-length code for each group. An image signal encoding device that uses an image signal s that has already been input to generate a predicted signal x^ of a multilevel image signal x that is currently being input.
means for generating a prediction error signal e of the multivalued image signal x; means for generating a mode signal M indicating the degree of accuracy of the prediction using the degree of change in the image signal s; The prediction error signal e is divided into groups according to the signal value of the mode signal M, and for each group, a set of unequal length codes determined according to the probability distribution of the prediction error signal e in each group is used. An image signal encoding device characterized by having means for unequal length encoding the prediction error signal e is obtained. By using the present invention, image signals can be efficiently encoded. The present invention will be explained in detail below using the drawings. The image signal has 16 values from 0 to 15 (4 bits/pixel),
An example in which the reference image signal S consists of three pixels a, b, and c in FIG. 1 will be explained. First, a first example will be described. FIG. 6 is an example of a block diagram of the first embodiment of the encoding device of the present invention. In FIG. 6, an image signal (4 bits/pixel) is sequentially input to a 4(l+2) bit shift register 1. Here, l is the number of pixels per main scanning line, and the shift register 1 stores image signals of 1 line + 2 pixels. The pixel that has just been input to shift register 1 is x, the one that was input just before is a, the one that was input (l-1) pixels before is c, and the one that was input one line ago is c. It is b. Prediction signal generator 2
is the reference image signal S=(a,
b, c), and input a, c) as shown in equation (2).
A predicted signal x^ of x is created and output by linear calculation of b and c. The subtracter 3 extracts x^ from the prediction signal generator 2,
Input x from shift register 1, calculate the difference signal (see equation (1)), and output. This is the prediction error signal e of x. The mode signal generator 4 generates a reference image signal S=(a, b, c) from the shift register 1.
is input, and a mode signal M is output. The mode signal M takes two values, 0 and 1, and M=0 means that the prediction error signal e is so high that it concentrates on 0.
Conversely, 1 indicates a low degree of concentration at 0. As already explained in detail, the occurrence probability distribution P(e|S) of e varies greatly depending on S. Therefore, we type those in which P(e|S) is sharply concentrated at 0, such as S=S 1 , and conversely, P(e|S), such as S=S 2.
S) that exhibits a gentle mountain shape is called a type, and S is classified into two types: type and type. That is, the type has a high zero concentration of P(e|S), and the type has a low concentration. The mode signal generator 4 generates M=0 for type S and M=1 for type S according to this classification, and the prediction error signal encoding circuit 5
Add to. The prediction error signal encoding circuit 5 operates differently depending on the signal value of M. That is, when M=0, the prediction error signal encoding circuit 5 generates a code that matches the prediction error signal e when S is a type (hereinafter referred to as type e), and when M=1, when S is a type. The prediction error signal e when
(hereinafter referred to as type e). The probability distribution of occurrence of type e is P
Using (e|S) and the probability of occurrence of S P(S), it is given by P〓(e)=〓 SI P(e|S)P(S) (9). Here, 〓 SI means the sum of types S. P〓(e) is P(e|S 1 )
This is a distribution that sharply concentrates on 0, as shown in Figure 7, because it is an average of the types of distributions that concentrate sharply on 0. When M=0, the prediction error signal encoding circuit 5 uses the fact that e follows a distribution P〓(e) that is sharply concentrated at 0 to convert it into a code F〓(e).
Compression encoding is performed using Figure 8 shows the length L〓(e) of the symbol F〓(e). L〓(e) is very short for 0, which has a very high probability of occurrence, and e that is close to it, and is made very long for e, which is far from 0, which has a very low probability of occurrence. On the other hand, the occurrence probability distribution of type e is calculated using P(e|S) and the occurrence probability distribution of S P(S): P〓(e)= 〓 SH P(e|S)P(S) (10) is given by Here, 〓 SH means the sum of types S. P〓(e) is P(e|S 2 )
As shown in Figure 9, the distribution is a gentle mountain-shaped distribution centered on 0, and is averaged. When M=1, the prediction error signal encoding circuit 5 takes advantage of the fact that the type e follows a gentle mountain-shaped distribution P〓(e) centered on 0, and converts it into a code F〓(e). and compression-encodes it. FIG. 10 shows the length L(e) of the symbol F(e). L〓(e) is relatively short for 0, which has a relatively high probability of occurrence, and e around it, and is relatively long for e, which is far from 0, which has a relatively low probability of occurrence. As can be seen by comparing Figures 8 and 10, L〓(e) is longer for e around 0 and shorter for e far from 0 than L〓(e). . The feature of the present invention is that the code suitable for each type and type e is as described above.
The purpose is to increase the efficiency of compression encoding by increasing the ratio of F〓(e) and F〓(e). In conventional DPCM encoding, the code length L(e) (see Figure 3) is L〓(e) (see Figure 8) and L〓
This is an intermediate type of (e) (see Figure 10). Code length L
Although (e) does not fit the probability distribution for either type e or type e, it is determined so that it does not deviate too much from both. On the other hand, in the present invention, type e
Since the code length is set to match the occurrence probability distribution of e, L〓(e) for type e, and L〓(e) for type e, it is more efficient than conventional DPCM encoding. In conventional DPCM encoding, the code length of e is determined based on the type and the distribution that is the average of the types. Therefore, in conventional DPCM encoding, when e is a type, the code for e near zero is longer than the type code, and the encoding efficiency decreases, even though the zero concentration of e is high. Also conventional
In DPCM encoding, when e is of type, e
Although the zero concentration of e is low, the coding efficiency decreases because the code for e that is far from zero is longer than the code of type e. In the end, the prediction error signal encoding circuit 5 converts the code F〓(e) when M=0 to
When M=1, select code F〓(e) and output code F(e)
shall be. FIGS. 11, 12, and 13 are block diagrams showing specific examples of the configuration of the predicted signal generator 2, respectively. The predicted signal generator shown in FIG. 11 is a linear predicted signal generator corresponding to equation (2). In Figure 11,
Prediction coefficients are applied to a, b, and c by multipliers 6, 7, and 8.
k 1 , k 2 , and k 3 are multiplied, and the sum of the multiplication results is calculated by adder 9 and output as x^. The prediction signal generator shown in FIG. 12 changes the prediction coefficients k 1 , k 2 , k 3 depending on the signal value of M. This is because the appropriate prediction coefficients k 1 , k 2 , k 3 are considered to be different between a flat part of an image where M=0 and an edge part of an image where M=1. Using prediction coefficients that change in this way is expected to make predictions more accurate and improve coding efficiency. In FIG. 12, the selection circuits 10, 12, and 14 select prediction coefficients k 11 , k 21 , k 31 when M=0, and select prediction coefficients k 12 , k 22 , k 32 when M=1. Multiplier 11,1
3 and 15 perform multiplication of a, b, and c by the selected prediction coefficient. Adder 16 calculates the sum of these multiplication results and outputs it as x^. The predicted signal generator in FIG. 13 generates each reference image signal S=(a, b, c)
This is a method in which the predicted signal x^ is stored in the ROM 17. As mentioned above, by linear operation of a, b, c, x^
The method of determining is often used because it is simple, but the resulting x^ is not necessarily optimal when considered for each S. Let's consider the reasons below. Prediction coefficients k 1 , k 2 , k 3
is determined, for example, using equation (3) so that the root mean square prediction error is minimized. Equation (3) can be considered as follows. <e 2 > AV = <(xx^) 2 > AV = Σ S Σ X P(x,S)(xx^) 2 = Σ S Σ X P(S)P(x|S)(xx^) 2 = Σ S P(S){ Σ X P(x|S)(xx^) 2 } = Σ S P(S){ Σ X P(x|S)(xk 1 ak 2 bk 3 c) 2 } ( 11) Here, P(S) is the probability of occurrence of the reference image signal S,
P(x|S) is the conditional probability that the current image signal becomes x when the reference image signal is S. In equation (4), that is, equation (11), the mean square prediction error over all S is considered. By the way, the mean square prediction error < es 2 > AV for each S is different from this, < es 2 > AV = <(x s − x^ s ) 2 > AV = Σ X P(x|S) ( xx ^ ) 2 = Σ The subscript S added to e, x, x^, k 1 , k 2 , k 3 in equation (12) is especially the subscript S added to e, x, x^, k 1 , k 2 , k when the reference image signal is S. 3 . <e s
2 > Set prediction coefficient for each S so that AV is minimized
If k 15 , k 25 , and k 35 are determined, the mean square prediction error for all S is given by <e 2 > AV = Σ S P(S) < e s 2 > AV (13). Obviously, <e 2 > AV in (13) is smaller than <e 2 > AV in (11). However, in (11) the prediction coefficients k 1 , k 2 , k 3 were constant regardless of S, but in (13) it is necessary to give different prediction coefficients k 1 , k 2 , k 3 for each S. That is, it is necessary to store and prepare prediction coefficients k 1 , k 2 , k 3 for each S. This ends up being each S.
This is the same as storing and preparing the predicted signal x^ for each time. In many cases, x^ s that minimizes <e s 2 > AV in (12) is the same as x that occurs with the highest probability in each S. FIG. 13 shows the configuration of a predicted signal generator using this method. In Figure 13,
The ROM 17 inputs the reference image signal S=(a, b, c) as an address signal, and outputs the contents of the memory at the corresponding address as a prediction signal x^. The image signal is 16 values (4 bits), the reference image signal S is 3 pixels a,
When consisting of B and C, the ROM 17 has a 12-bit address and a 4-bit output. The configuration of Figure 13 is
Although ROM is required, as explained in detail above, the prediction accuracy is higher than the configurations shown in FIGS. 11 and 12. FIG. 14, FIG. 15, and FIG. 16 are block diagrams showing the configuration of the mode signal generator 4, respectively.
There are various possibilities, but three specific examples are shown below. The mode signal generator in FIG. 14 calculates the degree of change in the image signal within the reference image signal S=(a, b, c) by Σ=(a-b) 2 +(b-c) 2 +(c -a) 2 (14) Measured by the sum Σ of the square of the difference between the image signal and the image signal, M=0: Σ<θ (15) M=1: Σθ (16) When Σ is smaller than a certain threshold θ, M= 0, and when it is large, M=1. When the change in the image signal within S is small, it is considered to be a flat part of the image, and prediction is likely to be accurate, and P(e|S) often has a sharp type of distribution, so M=0. S
When the change in the image signal is large within the range, it is considered to be an edge part of the image, and prediction is difficult to be accurate.
Since S) often has a gentle mountain-type distribution, M=1. In FIG. 14, subtracters 18, 19, and 20 subtract a-b, b-c, and ca, and multiplier circuits 21, 22, and 23 subtract the respective squares (a-b) 2 and (b -c) 2 and (c-a) 2 are calculated and added to the adder circuit 24. The adder circuit 24 calculates their sum Σ and adds it to the threshold circuit 25. The threshold circuit 25 has a total sum Σ as a threshold value θ
A mode signal M is output when M is smaller than M=0 and when it is larger than M=1. The mode signal generator in FIG. 15 calculates the degree of change in the image signal within the reference image signal S=(a, b, c) as D MAX =Max {(ab) 2 , (bc) 2 , (ca) 2 } (17) and the maximum value of the square of the difference between the image signal in the reference image signal
It is measured by D MAX , M = 0: D MAX < θ (18) M = 1: D MAX θ (19) When D MAX is smaller than a certain threshold θ, M = 0, and when it is larger, M = 1. . In FIG. 15, subtraction circuits 26, 27, 28 are a-b, b-c, c-
The multiplication circuits 29, 30, 31 calculate the respective squares (a-b) 2 , (b-c) 2 , (c-
a) Calculate 2 and add it to the maximum value detection circuit 32. The maximum value detection circuit 32 detects (a-b) 2 , (b-c) 2 , (c
-a) Detect the maximum value DMAX of 2 and add it to the threshold circuit 33. The threshold circuit 33 outputs a mode signal of M=0 when D MAX is smaller than the threshold θ, and M=1 when D MAX is larger. The mode signal generator in FIG. 16 calculates the accuracy of prediction for each reference image signal S=(a, b, c),
The difficulty of hitting is stored in the ROM and output as a mode signal M. When the prediction is likely to be correct, M=
0, when it is difficult to hit, M=1. In Figure 16
The ROM 34 inputs the reference image signal S=(a, b, c) as an address signal, and outputs the contents of the memory at the corresponding address as a mode signal M. When the image signal is 16 values (4 bits) and the reference image signal S consists of 3 pixels a, b, c, the ROM 34 has address 12.
bit, output 1 bit. The configuration of Figure 16 is
Although it requires ROM, it has the advantage of being able to arbitrarily set the standard for predictability. For example, the mean square prediction error <e 2 s > AV = Σ e P(e|S) e 2 (20) found for each reference image signal S can be used as the standard. Here, the subscript S of e s particularly indicates e when the reference image signal is S. At this time, the mode signal M is as follows: M=0: <e 2 s > AV <θ (21) M=1: <e 2 s > AV θ (22) and <e 2 s > When AV is smaller than a certain value θ Set it as 0, and set it as 1 when it is large. Further, the probability P(o|S) that the prediction error signal becomes 0 when the reference image signal is S can be used as a standard. At this time, mode signal M
M=0: P(o|S) θ (23) M=1: P(o|S) < (24) and P(o|S) is 0 when it is larger than a certain value θ, and 1 when it is smaller. stipulate. No matter what other criteria are used for predictability, it is only necessary to write in the ROM 34 the signal values of M for each S determined by the criteria. Of course, M can also be determined by comparing Σ, D MAX and θ as in the configurations shown in FIGS. 14 and 15. Each S in each configuration
All you have to do is write M determined for each case in the ROM 34. FIG. 17 shows the prediction error signal encoding circuit 5 of FIG.
FIG. 2 is a block diagram showing an example. The image signal had 16 values from 0 to 15. In FIG. 17, the symbol ROM37
is the mode signal M and the prediction error signal e as the address signal
Input as A 5 to A 0 , and when M=0 (A 6 = 0), enter the sign F〓(e) for type e as M=1 (A 6 =
1), the sign F〓(e) for type e is Q 10
~ Output to Q 0 . This is applied to parallel data input terminals D 10 to D 0 of the shift register 39. The code length ROM 38 inputs the mode signal M and the prediction error signal e as address signals B 6 to B 0 , and M=0 (B 6 =
0), the length L of code F〓(e)〓 is the two's complement of (e) M
=1 (B 6 =1), the two's complement of the length L〓(e) of the code F〓(e) is output to P 3 to P 0 . This is counter 40
is added to the initial value setting terminals C3 to C0 . The shift register 39 has parallel data input terminals D10 ~
The code F(e) input to D 0 (F〓(e) when M=0, M
When =1, F〓(e)) is output one after another from the serial data output terminal SO in the order of D 10 to D 0 . At this time, the counter 40 calculates the length L(e) of the code F(e) (when M=0
L〓(e), when M=1, L〓(e)) is counted, and when the shift register 39 outputs a code of L(e) bits from SO, the shift operation is stopped there and the next code is started. Input data from the parallel data input terminal. Code ROM3 from Table 1 to Table 4
7. An example of the contents of the code length ROM is shown below. Tables 1 and 2 are for M=0 (A 6 =0),
Tables 3 and 4 are for M=1 (A 6 =1). The code ROM 37 has 11-bit output data terminals Q 10 to Q 0 . The number of bits at the output data terminal of is determined by the longest code length of F(e). When the length of code F(e) is shorter than the maximum code length of 11 bits,
Codes F(e) are stored in order from Q 10 to Q 0 direction. For example, in Table 1, when the ROM address is 2, the code ROM output data is 1101, which is
means Q 10 = 1, Q 9 = 1, Q 8 = 0, Q 7 = 1,
Q 6 to Q 0 are empty and can store anything. In the ROM address column, values are shown in decimal notation when A5 to A0 (same as B5 to B0 ) are considered as binary numbers with A5 as MSB and A0 as LSB. When the ROM address is 1, the prediction error signal e is a negative number, and A 5
~A 0 represents a negative number e in two's complement representation. For example, at ROM address -2, A 5 to A 0 is (111110) 2
It is. The code length ROM output data field shows the code length.
Output data P 3 to P 0 of the ROM 38 are described. P 3 ~ P 0 is the code length L(e) (L〓(e) when M=0, when M=1
It is the two's complement of L〓(e). When taking two's complement, P 3
~ Consider P 0 as a binary number where P 3 is the MSB (sign bit) and P 0 is the LSB. P 3 ~ in the code length ROM output data field
P0 is considered to be a binary number without a sign bit, with P3 being the MSB and P0 being the LSB, and is expressed in decimal notation. For example 13
indicates P 3 to P 0 = (1101) 2 . For reference, code length L(e) (M=
When M=0, L〓(e), when M=1, L〓(e)) is shown in decimal notation.
【表】【table】
【表】【table】
【表】【table】
【表】【table】
【表】
第18図と第19図は第1表〜第4表の符号
ROM37、符号長ROM38の内容を決めるた
めに用いた符号木である。第18図、第19図は
それぞれM=0の符号F〓(e)及びM=1に対する
符号F〓(e)に対する符号木である。符号木上の各
分岐点で上に分岐すると符号1が下に分岐すると
符号0が与えられる。符号木の終端は31個ありそ
れぞれ予測誤差信号e(+15〜−15)に対応する。
符号木の終端の< >内に対応するeの信号値が
記されており、それに続いて符号F(e)(第18図
ではM=0に対する符号F〓(e)、第19図ではM
=1に対する符号F〓(e))が記されている。M=
0に対する符号木(第18図)、符号表(第1表、
第2表)とM=1に対する符号木(第19図)、
符号表(第3表、第4表)を比較すればわかるよ
うに、タイプ(M=0)の符号F〓(e)の符号長
L〓(e)はタイプ(M=1)の符号F〓(e)の符号長
L〓(e)に比べ0周辺のeに対してはより短く、0
から離れたeに対してはより長く設定してある。
第17図の予測誤差信号符号化回路の動作を第
20図のタイムチヤートを用いて詳しく説明しよ
う。第20図で左隅に記された各信号名は、第1
7図の各信号線に付けられた信号名に対応する。
ただしt,L(e),COUTについては対応する信
号線が第17図に記されてないので説明をしてお
く。tは以下の説明の便利のために記された時刻
でありCLK信号が1パルス発生することに1増
加する。L(e)は符号F(e)の符号長であり、P3〜
P0はL(e)の2の補数になつている。COUTはカ
ウンタ40の内容を示し初期値はP3〜P0で与え
られる。以下第20図のタイムチヤートを用いて
第17図の予測誤差信号符号化回路の動作を説明
する。時刻0にSTAT信号が与えられると予測
誤差信号符号化回路は動作を開始する。まず
STAT信号よりカウンタ40がクリアされる。
時刻1においてパルス発生器35はSTAT信号
の立下りでパルス信号をDSTAを発生しOR回路
36に加える。OR回路36はDSTA信号を通過
させRQST信号として出力する。第6図のシフト
レジスタ1はRQST信号がHのときCLK信号に
よるシフト動作を行ない第1番目の現画像信号x
を入力する。それにつれて第6図の予測信号発生
器2、モード信号発生器4は第1番目の現画像信
号xに対する予測信号x^、モード信号Mを発生す
る。ただしシフトレジスタ1の内容は第1番目の
xが入力される前に0にクリアしておくものとす
る。そして第1番目のxに対する予測誤差信号e
が減算器3によりxとx^から計算され、本予測誤
差信号符号回路の符号ROM37(符号長ROM
38)にアドレス信号A5〜A0(B5〜B0)として
加えられる。モード信号Mは符号ROM37(符
号長ROM38)にアドレス信号A6,B6として加
えられる。第20図のタイムチヤートの場合第1
番目のeは1、Mは0である。符号ROM37は
アドレス信号M=0,e=1(A6=0,A5〜A0
=1)に基づき第1番目の符号F(e)をQ10〜Q8に
(101)2(第1図参照)と出力する。符号長ROM3
8はアドレス信号M=0,e=1(B6=0,B5〜
B0=1)に基づき第1番目の符号F(e)に対する
符号長L(e)=3の1の補数13(第1表参照)を出
力する。これはカウンタ40に初期値としてセツ
トされる。このセツト動作は、カウンタ40の
LD端子にRQST信号(H)が加えれるとその時刻の
終りになされる。したがつて時刻2においてカウ
ンタ40の内容COUTは0から13に変化する。
シフトレジスタ39は符号ROM37の出力Q10
〜Q0をパラレルデータ入力端子D10〜D0を介して
ロードする。このロード動作はシフトレジスタ3
9のLD端子にRQST信号(H)が加えられるとその
時刻の終りになされる。したがつてシフトレジス
タ39の出力信号SOは時刻2において時刻1の
Q10=1と等しくなる。時刻3,4でシフトレジ
スタ39でCLK信号によりシフト動作を行ない、
SO端子より符号0,1を順に出力する。そのと
きカウンタ40はCLK信号によりカウントアツ
プ動作を行ない、その内容COUTは14,15と変
化する。
4ビツトカウンタ40は時刻4においてその内
容がCOUT=(15)10になるとCARY信号を発生し
第1番目の符号F(e)の出力完了を検出する。
CARY信号はOR回路36を通過してRQSTとな
り、第6図のシフトレジスタ1に加えられる。シ
フトレジスタ1はRQST信号がHになるとシフト
動作を行ない第2番目の現画像信号xを入力す
る。それにつれて第6図の予測信号発生器2、モ
ード信号発生器4は第2番目の現画像信号xに対
する予測信号x^、モード信号Mを発生する。そし
て第2番目のxに対する予測誤差信号eが減算器
3によ計算され、第17図の予測誤差信号符号化
回路に加えられる。以下本予測誤差信号符号化回
路は、第1番目の予測誤差信号eに対するのと同
様の動作を行なう。第20図のタイムチヤートに
おいては第2番目の予測誤差信号eは0である。
時刻4において符号ROM37は符号F(e)=(0)
2(Q10=0)を出力し、符号長ROM38はL(e)の
1の補数(15)10を出力する。そして時刻5にお
いてシフトレジスタ39はSO端子より符号F(e)
=(0)2を(1ビツトの長さ)出力する。時刻5
においてカウンタ40は符号長ROM38よりL
(e)の1の補数(15)10をロードすると直ちに
CARY信号を発生する。CARY信号はOR回路3
6を通過してRQST信号となり、第6図のシフト
レジスタ1がシフト動作を行ない第3の現画像信
号xを入力することを要求する。第17図の予測
誤差信号は第20図のタイムチヤートに従つて以
後同様の動作をくり返す。
なおタイムチヤートの×印は信号値が不定であ
るかまたは、任意の値でかまわないことを示す。
以上で第1の実施例についての説明を終了する。
次に本発明の第2の実施例について説明する。
第21図は本発明の第2の実施例を示すブロツク
図である。以下第1の実施例と同様画像信号は0
から15の16値、参照画像信号は第1図の3画素
a,b,cからなるとして説明する。第21図に
おいて、減算器41は現画像信号x(0〜15)と
その予測信号x^(0〜15)との差を計算し(式(1)
参照)予測誤差信号e(+15〜−15)として出力
する。量子化器42は予測誤差信号e(+15〜−
15)5ビツトを量子化して5ビツト以下で表現で
きる信号yに変換する。加算器45は量子化予測
誤差信号yと予測信号x^を加えて局部復号信号
x′を作成する。局部復号信号x′はシフトレジスタ
44に入力される。シフトレジスタ44の一例を
第22図にシフトレジスタ48として示してあ
る。48は4(l+2)ビツトのシフトレジスタ
である。ここでlは一主走査線当りの画素数であ
る。シフトレジスタ48に現在入力されたばかり
の局部復号信号がx′、その直前に入力された局部
復号信号がa′、(l−1)画素前に入力された局
部復号信号がc′、l画素前すなわち1ライン前に
入力された局部復号信号がb′である。予測信号発
生器43はシフトレジスタ44より局部復号信号
a′,b′,c′を入力しそれに基づきxの予測信号x^
を出力する。第21図の予測信号発生器43の構
成は、第1の実施例における第6図の予測信号発
生器2と同様のもの(第11図〜第13図参照)
が考えられる。モード信号発生器47はシフトレ
ジスタ47より局部復号信号a′,b′,c′を入力し
それに基づきモード信号Mを出力する。第21図
のモード信号発生器47の構成は、第1の実施例
における第6図のモード信号発生器4と同様のも
の(第14図〜第16図参照)が考えられる。予
測誤差信号符号化回路48は量子化予測誤差信号
yを圧縮符号化し符号F(y)として出力する。
ことに予測誤差信号符号化回路48はM=0とM
=1とでは異なる動作を行なう。すなわちM=0
のときはそれに合つた符号F〓(y)を、M=1の
ときはそれに合つた符号F〓(y)を選択しF(y)
として出力する。第21図の予測誤差信号符号化
回路46の構成は、第1の実施例における第6図
の予測誤差信号符号化回路5と同様のもの(第1
7図参照)が考えられる。
第23図は予測誤差信号量子化回路42の量子
化特性の一例を示す図である。第23図で横軸が
入力予測誤差信号e、縦軸が出力量子化予測誤差
信号yを示す。第23図で量子化特性の折点の黒
丸はその折点を量子化特性曲線が通ることを、逆
に白丸はその折点を量子化特性曲線が通らないこ
とを示す。この量子化特性に従えば+15から−15
の31通りの値をとるeが、+15,+8,0,−8,−
15の5通りの値をとるyに変換される。5通りの
値をとるyは3ビツトで表現できる。本量子化回
路は5ビツトのeを3ビツトで表現できるyに変
換する回路である。第2の実施例が第1の実施例
と異なる点は予測誤差信号量子化回路42のある
点である。第2の実施例では予測誤差信号eを粗
く量子化してyとした上で圧縮符号化するので符
号化効率は第1の実施例よりよくなる。ただし量
子化雑音(量子化回路によつてyはeから少しず
れた値になる。このずれの量のこと)により局部
復号信号x′はxと異なるものになる。第2の実施
例の符号化装置と対になる復号化装置では復号化
信号としてx′のみが得られるので、画像信号xは
完全に復号されないで少し異なつた画像信号x′し
か得られない欠点がある。それに対し第1の実施
例の符号化装置と対になる復号化装置では復号化
信号として画像信号xとぴつたり同じものを得る
ことができる。
以上で第2の実施例についての説明を終了す
る。
以上第1、第2の実施例を通してモード信号M
は2値信号としたが、3値、4値あるいはそれ以
上の多値信号とすることも考えられる。そうする
と予測誤差信号e(量子化予測誤差信号y)は3
分類、4分類あるいはそれ以上に多分類した後に
符号化することができ、各タイプに分類されたe
(y)に対しぴつたりマツチした符号割合とを行
なえばさらに符号化効率を上げることができる。
また第1、第2の実施例を通して参照画像信号S
は3画素a,b,cからなるとしたが、4画素、
5画素さらにそれ以上に増加して予測を当りやす
くしてもよい。さらに画像信号は常に0〜15の16
値(4ビツト)として説明したが、他のレベル数
を有する画像信号に対する符号化装置も同様にし
て構成できる。
また第1、第2の実施例を通じて予測誤差信号
eとして現画像信号xとその予測信号x^との差信
号((1)式参照)を用いたが、予測誤差信号eとし
て予測の当り易さの順位を用いる(電子通信学会
技術研究報告、CS79−176、水野他“中間調フア
クシミリ信号の符号化”)ことも考えられる。
以上説明してきたように、本発明によれば従来
のDPCM符号化よりずつと能率よく画像信号を
符号化できる。[Table] Figures 18 and 19 are the codes of Tables 1 to 4.
This is a code tree used to determine the contents of the ROM 37 and code length ROM 38. 18 and 19 are code trees for the code F〓(e) for M=0 and the code F〓(e) for M=1, respectively. At each branch point on the code tree, a code 1 is given when branching upward, and a code 0 is given when branching downward. There are 31 terminal ends of the code tree, each corresponding to a prediction error signal e (+15 to -15).
The corresponding signal value of e is written in <> at the end of the code tree, followed by the code F(e) (code F〓(e) for M=0 in Fig. 18, M
The code F〓(e)) for =1 is written. M=
Code tree for 0 (Figure 18), code table (Table 1,
Table 2) and the code tree for M=1 (Figure 19),
As can be seen by comparing the code tables (Tables 3 and 4), the code length of type (M=0) code F〓(e)
L〓(e) is the code length of code F〓(e) of type (M=1)
Compared to L〓(e), it is shorter for e around 0, and 0
It is set longer for e that is far from . The operation of the prediction error signal encoding circuit shown in FIG. 17 will be explained in detail using the time chart shown in FIG. 20. Each signal name written in the left corner of Fig. 20 is
This corresponds to the signal name given to each signal line in Figure 7.
However, since the corresponding signal lines for t, L(e), and COUT are not shown in FIG. 17, they will be explained. t is a time noted for the convenience of the following explanation, and is increased by 1 when the CLK signal generates one pulse. L(e) is the code length of code F(e), and P 3 ~
P 0 is the two's complement of L(e). COUT indicates the contents of the counter 40, and initial values are given by P3 to P0 . The operation of the prediction error signal encoding circuit shown in FIG. 17 will be explained below using the time chart shown in FIG. When the STAT signal is applied at time 0, the prediction error signal encoding circuit starts operating. first
The counter 40 is cleared by the STAT signal.
At time 1, the pulse generator 35 generates a pulse signal DSTA at the falling edge of the STAT signal and applies it to the OR circuit 36. The OR circuit 36 passes the DSTA signal and outputs it as an RQST signal. The shift register 1 in FIG. 6 performs a shift operation based on the CLK signal when the RQST signal is H, and outputs the first current image signal x.
Enter. Accordingly, the prediction signal generator 2 and mode signal generator 4 shown in FIG. 6 generate a prediction signal x^ and a mode signal M for the first current image signal x. However, it is assumed that the contents of shift register 1 are cleared to 0 before the first x is input. And the prediction error signal e for the first x
is calculated from x and x^ by the subtracter 3, and the code ROM 37 (code length ROM
38) as address signals A 5 -A 0 (B 5 -B 0 ). The mode signal M is applied to the code ROM 37 (code length ROM 38) as address signals A 6 and B 6 . In the case of the time chart in Figure 20, the first
The th e is 1 and M is 0. The code ROM 37 has address signals M=0, e=1 (A 6 =0, A 5 to A 0
=1), the first code F(e) is outputted to Q 10 to Q 8 as (101) 2 (see FIG. 1). Code length ROM3
8 is an address signal M=0, e=1 (B 6 =0, B 5 ~
B 0 =1), the one's complement number 13 (see Table 1) of the code length L(e)=3 for the first code F(e) is output. This is set in the counter 40 as an initial value. This setting operation is performed by the counter 40.
When the RQST signal (H) is applied to the LD terminal, it is applied at the end of that time. Therefore, at time 2, the content COUT of the counter 40 changes from 0 to 13.
The shift register 39 outputs the code ROM 37 output Q 10
Load ~Q 0 via parallel data input terminals D 10 ~ D 0 . This load operation is performed by shift register 3.
When the RQST signal (H) is applied to the LD terminal of 9, it is applied at the end of that time. Therefore, the output signal SO of the shift register 39 at time 2 is the same as that at time 1.
It becomes equal to Q 10 =1. At times 3 and 4, the shift register 39 performs a shift operation using the CLK signal,
Outputs codes 0 and 1 sequentially from the SO terminal. At this time, the counter 40 performs a count-up operation based on the CLK signal, and its contents COUT change to 14 and 15. When the content of the 4-bit counter 40 becomes COUT=(15) 10 at time 4, it generates a CARY signal and detects the completion of output of the first code F(e).
The CARY signal passes through the OR circuit 36, becomes RQST, and is added to the shift register 1 in FIG. When the RQST signal becomes H, the shift register 1 performs a shift operation and inputs the second current image signal x. Accordingly, the prediction signal generator 2 and mode signal generator 4 shown in FIG. 6 generate a prediction signal x^ and a mode signal M for the second current image signal x. Then, the prediction error signal e for the second x is calculated by the subtracter 3 and added to the prediction error signal encoding circuit shown in FIG. Thereafter, the present prediction error signal encoding circuit performs the same operation as for the first prediction error signal e. In the time chart of FIG. 20, the second prediction error signal e is 0.
At time 4, the code ROM 37 has the code F(e)=(0)
2 (Q 10 =0), and the code length ROM 38 outputs 1's complement (15) 10 of L(e). Then, at time 5, the shift register 39 receives the sign F(e) from the SO terminal.
=(0) Outputs 2 (length of 1 bit). Time 5
, the counter 40 is L from the code length ROM 38.
One's complement of (e) (15) Immediately after loading 10
Generate CARY signal. CARY signal is OR circuit 3
6 and becomes the RQST signal, which requests the shift register 1 of FIG. 6 to perform a shift operation and input the third current image signal x. The prediction error signal shown in FIG. 17 repeats the same operation thereafter in accordance with the time chart shown in FIG. Note that the x mark on the time chart indicates that the signal value is indefinite or may be any value.
This concludes the description of the first embodiment. Next, a second embodiment of the present invention will be described.
FIG. 21 is a block diagram showing a second embodiment of the present invention. Below, as in the first embodiment, the image signal is 0.
The explanation will be made assuming that the reference image signal consists of the three pixels a, b, and c in FIG. 1. In FIG. 21, the subtracter 41 calculates the difference between the current image signal x (0 to 15) and its predicted signal x^ (0 to 15) (Equation (1)
Reference) Output as prediction error signal e (+15 to -15). The quantizer 42 generates a prediction error signal e (+15 to -
15) Quantize 5 bits and convert to signal y that can be expressed with 5 bits or less. The adder 45 adds the quantized prediction error signal y and the prediction signal x^ to produce a locally decoded signal.
Create x′. Local decoded signal x' is input to shift register 44. An example of shift register 44 is shown as shift register 48 in FIG. 48 is a 4(l+2) bit shift register. Here, l is the number of pixels per main scanning line. The local decoded signal just input to the shift register 48 is x', the local decoded signal input immediately before is a', the local decoded signal input (l-1) pixels before is c', l pixel before. That is, the locally decoded signal input one line before is b'. The predicted signal generator 43 receives the locally decoded signal from the shift register 44.
Input a′, b′, c′ and based on them, predict signal x^ of x
Output. The configuration of the predicted signal generator 43 in FIG. 21 is similar to that of the predicted signal generator 2 in FIG. 6 in the first embodiment (see FIGS. 11 to 13).
is possible. The mode signal generator 47 receives local decoded signals a', b', c' from the shift register 47 and outputs a mode signal M based thereon. The configuration of the mode signal generator 47 in FIG. 21 may be similar to that of the mode signal generator 4 in FIG. 6 in the first embodiment (see FIGS. 14 to 16). The prediction error signal encoding circuit 48 compresses and encodes the quantized prediction error signal y and outputs it as a code F(y).
In particular, the prediction error signal encoding circuit 48
=1, a different operation is performed. That is, M=0
When M=1, select the appropriate code F〓(y), and when M=1, select the appropriate code F〓(y), and select F(y).
Output as . The configuration of the prediction error signal encoding circuit 46 in FIG. 21 is similar to that of the prediction error signal encoding circuit 5 in FIG. 6 in the first embodiment (the first
(see Figure 7) is possible. FIG. 23 is a diagram showing an example of quantization characteristics of the prediction error signal quantization circuit 42. In FIG. 23, the horizontal axis shows the input prediction error signal e, and the vertical axis shows the output quantized prediction error signal y. In FIG. 23, a black circle at a break point of the quantization characteristic indicates that the quantization characteristic curve passes through that break point, and a white circle indicates that the quantization characteristic curve does not pass through that break point. According to this quantization characteristic, +15 to -15
e takes on 31 values: +15, +8, 0, -8, -
It is converted to y, which takes on 5 values of 15. y, which takes on 5 different values, can be expressed using 3 bits. This quantization circuit is a circuit that converts 5 bits e into y that can be expressed in 3 bits. The second embodiment differs from the first embodiment in that a prediction error signal quantization circuit 42 is present. In the second embodiment, the prediction error signal e is roughly quantized into y and then compressed and encoded, so that the encoding efficiency is better than in the first embodiment. However, the locally decoded signal x' differs from x due to quantization noise (the value of y slightly deviates from e depending on the quantization circuit. This refers to the amount of deviation). Since the decoding device paired with the encoding device of the second embodiment only obtains x' as a decoded signal, the image signal x is not completely decoded and only a slightly different image signal x' is obtained. There is. On the other hand, the decoding device paired with the encoding device of the first embodiment can obtain exactly the same decoded signal as the image signal x. This concludes the description of the second embodiment. Through the above first and second embodiments, the mode signal M
Although a binary signal is used, it is also possible to use a 3-value, 4-value, or more multi-value signal. Then, the prediction error signal e (quantized prediction error signal y) is 3
It can be encoded after classification, four or more classifications, and e classified into each type can be encoded.
If the code ratio is exactly matched to (y), the coding efficiency can be further improved.
Also, throughout the first and second embodiments, the reference image signal S
consists of 3 pixels a, b, c, but 4 pixels,
The number of pixels may be increased to 5 pixels or more to make the prediction more accurate. Furthermore, the image signal is always 16 from 0 to 15.
Although the explanation has been made using a value (4 bits), encoding devices for image signals having other numbers of levels can be constructed in a similar manner. Furthermore, in the first and second embodiments, the difference signal between the current image signal x and its predicted signal x^ (see equation (1)) was used as the prediction error signal e, but the prediction error signal It is also possible to use the ranking of facsimile signals (IEICE technical research report, CS79-176, Mizuno et al., "Coding of halftone facsimile signals"). As described above, according to the present invention, image signals can be encoded more efficiently than conventional DPCM encoding.
第1図は入力中の画像信号と参照画像信号の位
置関係の一例を示す図、第2,4,5,7,9図
は各種の予測誤差信号発生確率分布の一例を示す
図、第3,8,10図は予測誤差信号に対する各
種符号の長さの一例を示す図、第6図、第21図
は本発明の符号化装置の第1、第2の実施例を示
すブロツク図、第11,12,13図は各種予測
信号発生器の一例を示す図、第14,15,16
図は各種モード信号発生器の一例を示す図、第1
7図は予測誤差信号符号化回路の一例を示す図、
第18,19図は符号木の一例を示す図、第20
図は符号化装置のタイムチヤートの一例を示す
図、第22図はシフトレジスタの一例を示す図、
第23図は予測誤差信号量子化回路の量子化特性
の一例を示す図である。
図において、1,44,48……画像信号格納
用シフトレジスタ、2,43……予測信号発生
器、4,47……モード信号発生器、3,18,
19,20,26,27,28,41……減算回
路、9,16,24,45……加算回路、5,4
6……予測誤差信号符号化回路、6,7,8,1
1,13,15,21,22,23,29,3
0,31……乗算回路、10,12,14……選
択回路、17……予測信号発生ROM、25,3
3……閾値回路、32……最大値検出回路、34
……モード信号発生ROM、35……パルス発生
回路、36……OR回路、37……符号ROM、
38……符号長ROM、40……カウンタ、39
……符号出力用シフトレジスタ、42……予測誤
差信号量子化回路。
Figure 1 is a diagram showing an example of the positional relationship between the image signal being input and the reference image signal, Figures 2, 4, 5, 7, and 9 are diagrams showing examples of various prediction error signal generation probability distributions, , 8 and 10 are diagrams showing examples of the lengths of various codes for prediction error signals. Figures 11, 12 and 13 are diagrams showing examples of various predicted signal generators, Figures 14, 15 and 16
The figure shows an example of various mode signal generators.
FIG. 7 is a diagram showing an example of a prediction error signal encoding circuit,
Figures 18 and 19 are diagrams showing examples of code trees;
22 is a diagram showing an example of a time chart of an encoding device, FIG. 22 is a diagram showing an example of a shift register,
FIG. 23 is a diagram showing an example of the quantization characteristics of the prediction error signal quantization circuit. In the figure, 1, 44, 48...shift register for storing image signals, 2, 43... prediction signal generator, 4, 47... mode signal generator, 3, 18,
19, 20, 26, 27, 28, 41... Subtraction circuit, 9, 16, 24, 45... Addition circuit, 5, 4
6...Prediction error signal encoding circuit, 6, 7, 8, 1
1, 13, 15, 21, 22, 23, 29, 3
0, 31... Multiplication circuit, 10, 12, 14... Selection circuit, 17... Prediction signal generation ROM, 25, 3
3... Threshold circuit, 32... Maximum value detection circuit, 34
...Mode signal generation ROM, 35...Pulse generation circuit, 36...OR circuit, 37...Sign ROM,
38... Code length ROM, 40... Counter, 39
. . . Shift register for code output, 42 . . . Prediction error signal quantization circuit.
Claims (1)
とに複数のグループにグループ分けし、グループ
ごとに異なる不等長符号によつて、1画素ごとに
不等長符号化する画像信号符号化装置であつて、
すでに入力ずみの画像信号sを用いて現在入力中
の多値画像信号xの予測信号x^を発生する手段
と、多値画像信号xの予測誤差信号eを発生する
手段と、前記画像信号sの変化の程度を用いて前
記予測の当たる程度を示すモード信号Mを発生す
る手段と、前記予測誤差信号eを前記モード信号
Mの信号値によつてグループ分けし、各グループ
別に、各グループにおける予測誤差信号eの発生
確率分布にしたがつて定められた符号長符号のセ
ツトを用いて予測誤差信号eを不等長符号化する
手段を有することを特徴とする画像信号符号化装
置。1. An image signal encoding device that divides the prediction error signal of an input multilevel image signal into a plurality of groups for each pixel, and performs unequal length encoding for each pixel using an unequal length code that differs for each group. And,
means for generating a prediction signal x^ of the currently input multi-value image signal x using the already input image signal s; means for generating a prediction error signal e of the multi-value image signal x; and the image signal s. means for generating a mode signal M indicating the degree of accuracy of the prediction using the degree of change in the prediction error signal e; dividing the prediction error signal e into groups according to the signal value of the mode signal M; An image signal encoding device comprising means for unequal-length encoding a prediction error signal e using a set of code length codes determined according to the occurrence probability distribution of the prediction error signal e.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP56034888A JPS57150278A (en) | 1981-03-11 | 1981-03-11 | Picture signal encoding device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP56034888A JPS57150278A (en) | 1981-03-11 | 1981-03-11 | Picture signal encoding device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS57150278A JPS57150278A (en) | 1982-09-17 |
| JPH0366861B2 true JPH0366861B2 (en) | 1991-10-18 |
Family
ID=12426686
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP56034888A Granted JPS57150278A (en) | 1981-03-11 | 1981-03-11 | Picture signal encoding device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS57150278A (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59143485A (en) * | 1983-02-04 | 1984-08-17 | Mitsubishi Electric Corp | Encoding method of ntsc composite color signal |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5927503B2 (en) * | 1977-02-24 | 1984-07-06 | 三菱電機株式会社 | calligraphy communication device |
| JPS6023543B2 (en) * | 1978-10-26 | 1985-06-07 | 沖電気工業株式会社 | Signal transmission method |
-
1981
- 1981-03-11 JP JP56034888A patent/JPS57150278A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS57150278A (en) | 1982-09-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3017380B2 (en) | Data compression method and apparatus, and data decompression method and apparatus | |
| US6654503B1 (en) | Block-based, adaptive, lossless image coder | |
| US6654419B1 (en) | Block-based, adaptive, lossless video coder | |
| US5065446A (en) | Image data coding apparatus | |
| JP4085116B2 (en) | Compression and decompression of image data in units of blocks | |
| US7561744B2 (en) | Image encoding apparatus, image decoding apparatus, and their control method, and computer program and computer-readable storage medium | |
| CN1118537A (en) | Huffman decoder | |
| US4870695A (en) | Compression and de-compression of column-interlaced, row-interlaced graylevel digital images | |
| US4807298A (en) | Method of and system for digital signal coding by vector quantization | |
| JPS6318777A (en) | Dither signal coding/decoding processing method | |
| US9014273B2 (en) | Method and assembly used for vector transfer | |
| US5960117A (en) | Method of adaptive arithmetic encoding/decoding according to JBIG standard | |
| JPH0366861B2 (en) | ||
| WO1997006641A1 (en) | Image encoder, image decoder, image decoding method, and image transmitting system | |
| AU606816B2 (en) | Method for encoding/transmitting images | |
| JPH0237737B2 (en) | ||
| US6870491B2 (en) | Data decompression technique for image processing | |
| JP3985465B2 (en) | Image encoding apparatus, image decoding apparatus, image encoding / decoding apparatus, and methods thereof | |
| JP2783221B2 (en) | Decryption method | |
| Li et al. | A novel VQ codebook design technique | |
| JP2808110B2 (en) | Digital image data compression method | |
| JP2583089B2 (en) | Adaptive vector quantization | |
| JPH0936749A (en) | Encoding / decoding apparatus and encoding method used therefor | |
| JP2548122B2 (en) | Encoder | |
| JPH0262992B2 (en) |