JP3855376B2 - Image encoding device - Google Patents

Image encoding device Download PDF

Info

Publication number
JP3855376B2
JP3855376B2 JP17335697A JP17335697A JP3855376B2 JP 3855376 B2 JP3855376 B2 JP 3855376B2 JP 17335697 A JP17335697 A JP 17335697A JP 17335697 A JP17335697 A JP 17335697A JP 3855376 B2 JP3855376 B2 JP 3855376B2
Authority
JP
Japan
Prior art keywords
prediction
pixel value
predicted
pixel
image
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
Application number
JP17335697A
Other languages
Japanese (ja)
Other versions
JPH1127679A (en
Inventor
一弘 鈴木
太郎 横瀬
信次 宍戸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP17335697A priority Critical patent/JP3855376B2/en
Publication of JPH1127679A publication Critical patent/JPH1127679A/en
Application granted granted Critical
Publication of JP3855376B2 publication Critical patent/JP3855376B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像符号化装置に関するものであり、特に多値の入力画像に対する可逆符号化に関するものである。
【0002】
【従来の技術】
画像は一般に非常に大量のデータとなるので、蓄積や伝送の際には符号化によって圧縮するのが一般的である。画像データの符号化手法は、可逆符号化方式と非可逆符号化方式の2種類に大別される。後者の場合、圧縮率によっては復号画像に視覚的な劣化を生ずる可能性がある。
【0003】
近年、PDL(Page Description Language)で記述される画像を代表として、コンピュータで作成される画像(以下、総称してCG画像と呼ぶ)が増加している。これらの画像は従来のスキャンインされた画像に比較して、スキャン時の雑音成分を含まないため、エッジ等において非可逆符号化による画質劣化が非常に目立ちやすい。
【0004】
こうした画質劣化の問題は、入力された画像と同一の復号画像が得られる可逆符号化を使用することで回避することができる。
【0005】
特願平95−00161号(現在、未公開)に開示される「画像符号化装置および画像復号装置」は、こうした可逆の符号化を実現するためになされたものである。
【0006】
図8は特願平95−00161号で提案した画像符号化復号装置の構成を示すブロック図である。
【0007】
同図において、10は画像入力部、20は第1予測部、21は第2予測部、22は第3予測部、30は予測誤差算出部、40は選択部、50は符号化部、60は符号出力部であり、選択部40において、401,402,403は減算部、404,405,406は零判定部、407はAND、408は識別番号決定部、409は多重化部、である。
【0008】
続いて同図に基づいて動作を説明する。
【0009】
第1予測部20、第2予測部21、第3予測部22は、それぞれ所定の手法で画像データ100に基づいて注目画素の画素値を予測し、予測値データ110として選択部40へ送出する。
【0010】
予測の手法としては、例えば図7(a)に示されるような、予測の対象となる注目画素Xの周辺に位置する画素a,b,c,dを読み出してこれらの画素の値を予測値データ110とするものがある。
【0011】
予測誤差算出部30は、所定の手法で画像データ100に基づいて注目画素の画素値を予測し、その予測値を注目画素の実際の画素値から減算し、予測誤差データ120として選択部40へ送出する。
【0012】
選択部40は画像データ100と予測値データ110から注目画素における予測の一致/不一致を検出する。
【0013】
第1予測部20、第2予測部21、第3予測部22から出力される予測値データ110は、それぞれ減算部401,402,403において画像データ100との差分が計算される。さらに、零判定部404,405,406では差分が零であるかが判定され、零である場合は識別番号決定部408に判定結果が通知され、零でない場合はAND407に結果が通知される。AND407は、減算部401,402,403で計算された全ての差分が零でない場合を検出し、結果を識別番号決定部408に通知する。
【0014】
識別番号決定部408は、零判定部404,405,406の出力する判定結果とAND407の出力の4つの入力のそれぞれを一意に識別する識別番号を保持し、入力されたものに対応する識別番号を多重化部409に出力する。なお、識別番号の割当ては、固定にされる場合と出現頻度の変動に応じて動的に変更される場合がある。
【0015】
多重化部409は、零判定部404,405,406の判定結果のいずれかが零である場合、すなわち、第1予測部20、第2予測部21、第3予測部22のいずれの予測器が的中したかは、これに対応する識別番号を出力する。AND407の出力が検出された場合、すなわち、第1予測部20、第2予測部21、第3予測部22のいずれの予測器も的中しなかった場合は、これに対応する識別番号と予測誤差120を多重化して予測状況データ130を符号化部50に出力する
図6(a)は、予測状況データ130の構成を示す図である。これは、予測が的中した予測部の識別番号のみ、あるいは、いずれも的中しなかったことを示す識別番号と予測誤差データ120から構成される。
【0016】
符号化部50では、予測状況データ130の識別番号を対応する可変長の符号語で置き換えることにより可変長符号化する。
【0017】
図7(b)は、識別番号に対する可変長符号の割当ての例を説明する図である。
【0018】
図7(a)の予測器の構成において、周辺画素a,b,c,dの画素値をそのまま予測値とする場合、予測の的中率をa>b>c>d>(すべての予測がはずれる確率)と仮定し、また、識別番号決定部408は識別番号を発生確率の高いものから順に0,1,2,...と割当てるとすると、図7(b)の符号表が得られる。可変長の符号語は、発生確率順に並べられた識別番号に対して図7(c)に示すハフマン符号のツリーを構成して決定されている。
【0019】
図6(c)は、図6(b)に示す予測状況データ130を可変長符号化して得られる符号データ140を表している。
【0020】
符号出力部60は、符号データ140を図示されない伝送路、あるいは蓄積手段に対して出力する。
【0021】
以上の構成、及び動作で従来技術における画像の符号化装置によって画像信号が可逆に符号化されることになる。
【0022】
【発明が解決しようとする課題】
CG(コンピュータ・グラフィックス)画像には、(1)使用される画素値が特定の値に偏ることが多い、(2)同一画素値が隣接画素に存在することが多いという特徴を持つことが多い。
【0023】
先に説明した関連技術では、こうした特徴を利用し、注目画素と同じ画素値を予測した予測器の識別番号を符号化し、予測がはずれた場合は予測誤差を符号化することでCG画像の効率的な可逆符号化を実現していた。また、この時、より符号化効率を高めるために、予測器ごとに的中率に応じた可変長の符号を割当てていた。
【0024】
しかし、先の関連技術においては次のような問題があった。
【0025】
例えば、符号語長i,j,k(i≦j<kの自然数)の割当てられて3つの予測器を使用する場合について考える。符号語長iとjの予測器が同一の予測値となり、これらの予測が的中した場合は、圧縮の観点からは符号長の短い長さiの符号語が常に選ばれ、長さjの符号語が選ばれることはない。
【0026】
一方、符号語長iとjの予測器が同一の予測値で、かつ、予測が的中しなかった場合に、符号語長kが割当てられた予測器が的中することがあり、この時、長さjの符号語は使用されないにもかかわらず、長さkの符号語がそのまま使用されていた。
【0027】
本発明は上述した事情に鑑みてなされたもので、PDLで記述された画像をはじめとするコンピュータ作成画像に対し、圧縮率の高い可逆符号化装置および復号装置を提供することを目的とするものである。
【0028】
【課題を解決するための手段】
本発明の請求項1によれば、上記課題を解決するために、画像を入力する画像入力手段と、前記画像入力手段により入力した画像内の符号化対象である注目画素の画素値をそれぞれ異なる予測手法で予測する複数の予測手段と、前記画像入力手段により入力した画像内の注目画素の画素値と所定の予測手法で予測された予測値との誤差を算出する予測誤差算出手段と、前記複数の予測手段により予測した画素値と注目画素の画素値とが一致するか否かを判断する一致判断手段と、前記一致判断手段により、前記複数の予測手段のうちいずれかの予測手段により予測した画素値と注目画素の画素値とが一致した場合には、前記一致すると判断された予測手段を出力し、前記一致すると判断されない場合には上記誤差を選択して出力する選択手段と、前記選択手段により出力された識別情報及び誤差を符号化する符号化手段と、前記符号化手段により符号化された符号を出力する出力手段とを備えた画像符号化装置において、前記複数の予測手段の少なくとも一つの予測結果が一致し、かつ、不一致と判定された少なくとも二つの予測手段の予測した画素値が等しいことを判定し、前記符号化手段において各々の予測手段に対応する識別情報に付与される可変長2進系列の長さに基づいて前記符号化手段における2進系列の割当て変更を行うと判定する判定手段を備えたことを特徴とする。
【0029】
さらに、前記複数の予測手段のうちで、予測した画素値と注目画素の画素値とが一致する予測手段の識別情報に長さk(kは自然数)の可変長2進系列が前記符号化手段により割当てられている時に、前記複数の予測手段のうちで、予測した画素値と注目画素の画素値とが一致しなかった予測手段で予測した画素値が等しいものが複数存在し、かつ、これらの予測手段の識別情報が前記符号化手段において長さkよりも短い2進系列が割当てられる場合、前記判定手段から2進系列の割当て変更通知を受けた時に、前記長さkよりも短い2進系列のうちで最も長い2進系列を予測した画素値と注目画素の画素値とが一致する予測手段の識別情報に割当てることを特徴とする。また、後に図3を参照して説明するような態様で、予測した画素値と注目画素の画素値とが一致する予測手段の識別情報に割当てられる2進系列の長さが、2進系列の割り当て変更前の長さより短くなるように、予測した画素値が等しい複数の予測手段のそれぞれの識別情報のうち一部に割り当てられていた前記長さkより短い2進系列を、前記予測した画素値が等しい複数の予測手段の他の予測手段の識別情報に割り当ててもよい。
【0030】
また、本発明の請求項によれば、前記符号化手段がハフマン符号の2進系列を符号語として可変長符号化して前記符号を構成することを特徴とする。
【0032】
また、前記一致判断手段は、前記予測手段により予測した画素値と注目画素の画素値との間の誤差が所定の閾値以内のときに上記予測した画素値と注目画素の画素値とが一致していると判断するようにしてもよい。
【0033】
以上の構成によれば、先の関連技術のように複数の予測部のうち予測が的中した予測部の識別番号を符号化するだけでなく、複数の予測部が同一の予測を行い、かつ予測がはずれであった場合に使用されない符号語が発生することに着目し、この冗長性を削減するように符号語の再割当てをすることで圧縮率をより高くすることができる。
【0034】
【発明の実施の形態】
以下、本発明の概念について説明するが、はじめに説明の前提について述べる。
【0035】
以下の説明では、従来技術の項と同様に、図7(a)の構成の予測器を使用し、注目画素Xの周辺画素a,b,c,dの画素値を予測値とする。予測の的中率は、a>b>c>d>(すべての予測がはずれる確率)と仮定し、識別番号は、発生確率の高いものから順に0,1,2,...と割当てるものとする。ただし、これらは説明のための仮定であって、本発明を限定するものではない。
【0036】
以上の前提から、発生確率順に並べられた識別番号に対して図7(c)に示すハフマン符号のツリーが構成され、図7(b)の識別番号と可変長符号語の対応表が得られる。
【0037】
図2は、予測器内の画素の状態を説明する図である。
【0038】
図2(a)のように、参照画素b,c、および注目画素Xが同色(縦線の領域)の場合、参照画素bが注目画素Xと一致することから2ビットの符号語「10」が出力される。注目画素cも同色ではあるが、こちらを採用すると出力される符号語は3ビットの「110」となるため、符号化を目的とする場合には選択されることはない。
【0039】
図2(b)は、図2(a)の注目画素Xを復号する時の参照画素を示している。注目画素Xを復号する場合、参照画素bとcが同色(縦線の領域)であれば、参照画素bと同色であることを示す符号語「10」の可能性はあっても、参照画素cと同色であることを示す符号語「110」は、上述した理由から除外することができる。
【0040】
今、図2(c)のように参照画素b,cが同じ色(縦線の領域)で、参照画素dと注目画素Xが、参照画素b,cとは異なる同じ色(斜め線の領域)である場合を考える。
【0041】
この場合は、参照画素dとの一致を示す4ビットの符号語「1110」が出力される。しかし、上述したように、参照画素cとの一致を示す符号語「110」が使用されることはないので、参照画素dとの一致を示す符号として一時的に再割当てすることが可能となる。復号の際にも、同様の取決めをすることで、1ビットの情報が削減されることになる。
【0042】
図3は、4つの予測器(参照画素)を使用した場合にビットの削減が可能な組合せを示すものである。なお、予測器と符号語の対応関係は図7(b)の表を使用した。
【0043】
図3の第1列の予測器の予測が的中し、第2列に示される予測器の予測誤差が一致する場合に第3列の符号語の変更が可能であり、第4列はこの時削減されるビット数を表している。
【0044】
例えば、予測器2が注目画素と一致している場合、これらとは異なる色で予測器0と1(aとb)が一致しているときには、予測器1に割当てられた符号「10」が使用されることはないので、予測器2に割当てられる符号語「110」の代わりに使用できる。
【0045】
図4は、図3に示される各条件を満たす場合が実際の画像でどの程度発生するかを測定した結果である。測定には、PDLで記述された2種類のCG画像を使用した。画像Aは直線で構成される幾何学模様、画像Bは、LSIの配線図である。画素数は、いずれも3312×4680であり、色空間YMCKのK成分を用いている。
【0046】
図3に示される各条件で削減されるビット数と、図4に示される画像A,Bにおける各条件の発生回数の積の総和から削減される符号量を求めることができる。画像Aの場合は、341,080ビット(42,635バイト)、画像Bの場合は、669,427ビット(83,678バイト)の符号量が削減されることになる。
【0047】
【実施例】
本発明の第1の実施例について説明する。
【0048】
図1は、本発明の第1の実施例の構成を説明するブロック図である。なお図8に示される従来技術の構成と同一の構成については、同一番号を付して説明を省略する。
【0049】
同図において、410は、減算部401,402,403の出力する予測誤差信号と、識別番号決定部408における予測部と識別番号の対応情報とに基づいて図3の条件に該当する状態を検出し、符号化部50に符号変更情報を出力する判定部である。
【0050】
続いて図5のフローチャートに基づいて動作について説明する。
【0051】
はじめに、判定部410は、識別番号決定部408の出力する識別番号、すなわち注目画素と一致する予測を行った予測器で図3の表の第1列の条件を満たすものを検出する(図5−S1)。
【0052】
次に、判定部410は、識別番号決定部408から予測部と識別番号の対応情報を得て、図3の表の第2列、「予測値を比較する予測器の組合せ」を決定する(図5−S2)。
【0053】
さらに、判定部410は、減算部401,402,403の出力する予測誤差から、図5−S2で決定された組合せの予測部の予測誤差をそれぞれ読み込み(図5−S3)、一致するかを判定する(図5−S4)。
【0054】
一致した場合は、図3の表の3列目の符号語の変更を符号化部50に対して通知する(図5−S5)。
【0055】
以上の構成、及び動作により、本発明の画像の符号化装置による画像の符号化が実行される。
【0056】
なお、復号動作については、符号化動作より自明であるので説明を省略する。
【0057】
予測器の数、予測式はこれらに限定するものではない。
【0058】
また、的中した予測器の識別番号に割当てる2進系列を可変長の符号とし、これを多重化して符号データ140として出力しても良いし、割当てられた2進系列を算術符号化し、その出力として符号データ140を生成してもよい。
【0059】
また、予測した画素値と注目画素の画素値との間の誤差が所定の閾値以内のときに、予測した画素値と注目画素の画素値とが一致していると判断するようにしてもよい。
【0060】
【発明の効果】
以上、説明してきたように本発明よれば、従来技術のように複数の予測部のうち予測が的中した予測部を符号化するだけでなく、複数の予測部が同一の予測を行い、かつ予測がはずれであった場合に使用されない符号語が発生することに着目し、符号語の再割当てをすることで圧縮率をより高くすることができる。
【0061】
本発明の具体的な効果については、符号化される画像の内容や可変長符号の割当て方に大きく依存するものであるが、実施例の項に説明したように実際の画像に対して符号量の削減効果が確認されている。
【図面の簡単な説明】
【図1】 本発明の第1の実施例の構成を示すブロック図である。
【図2】 画素配置の説明図である。
【図3】 符号の再割当てを説明する図である。
【図4】 実際の画像での発生頻度を説明する図である。
【図5】 動作を説明するためのフローチャートである。
【図6】 データの構成を説明する図である。
【図7】 符号化の説明図である。
【図8】 従来技術の構成を示すブロック図である。
【符号の説明】
10…画像入力部、
20…第1予測部、
21…第2予測部、
22…第3予測部、
30…予測誤差算出部、
40…選択部、
50…符号化部、
51…復号部、
60…符号出力部、
100…画像データ、
110…予測値データ、
120…予測誤差データ、
130…予測状況データ、
140…符号データ、
401,402.403…減算器、
404,405,406…零判定部、
407…AND、
408…識別番号決定部、
409…多重化部、
410…判定部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image encoding device, and particularly to lossless encoding for a multi-valued input image.
[0002]
[Prior art]
Since an image generally has a very large amount of data, it is generally compressed by encoding at the time of storage or transmission. Image data encoding methods are roughly classified into two types, lossless encoding and lossy encoding. In the latter case, depending on the compression rate, visual degradation may occur in the decoded image.
[0003]
In recent years, images created by computers (hereinafter collectively referred to as CG images) are increasing, with images described in PDL (Page Description Language) as a representative. Since these images do not contain a noise component at the time of scanning as compared with a conventional scanned-in image, image quality deterioration due to lossy encoding at the edge or the like is very conspicuous.
[0004]
Such a problem of image quality degradation can be avoided by using lossless encoding that can obtain the same decoded image as the input image.
[0005]
The “image coding apparatus and image decoding apparatus” disclosed in Japanese Patent Application No. 95-00161 (currently unpublished) has been made to realize such reversible coding.
[0006]
FIG. 8 is a block diagram showing a configuration of an image encoding / decoding apparatus proposed in Japanese Patent Application No. 95-00161.
[0007]
In the figure, 10 is an image input unit, 20 is a first prediction unit, 21 is a second prediction unit, 22 is a third prediction unit, 30 is a prediction error calculation unit, 40 is a selection unit, 50 is an encoding unit, 60 Is a code output unit. In the selection unit 40, 401, 402, and 403 are subtraction units, 404, 405, and 406 are zero determination units, 407 is AND, 408 is an identification number determination unit, and 409 is a multiplexing unit. .
[0008]
Subsequently, the operation will be described with reference to FIG.
[0009]
The first prediction unit 20, the second prediction unit 21, and the third prediction unit 22 each predict the pixel value of the target pixel based on the image data 100 by a predetermined method, and send the prediction value data 110 to the selection unit 40. .
[0010]
As a prediction method, for example, as shown in FIG. 7A, pixels a, b, c, and d positioned around the target pixel X to be predicted are read, and the values of these pixels are predicted values. Some data is 110.
[0011]
The prediction error calculation unit 30 predicts the pixel value of the target pixel based on the image data 100 by a predetermined method, subtracts the prediction value from the actual pixel value of the target pixel, and outputs the prediction error data 120 to the selection unit 40. Send it out.
[0012]
The selection unit 40 detects a prediction match / mismatch in the target pixel from the image data 100 and the prediction value data 110.
[0013]
Differences between the prediction value data 110 output from the first prediction unit 20, the second prediction unit 21, and the third prediction unit 22 and the image data 100 are calculated in subtraction units 401, 402, and 403, respectively. Further, the zero determination units 404, 405, and 406 determine whether the difference is zero. If the difference is zero, the determination result is notified to the identification number determination unit 408, and if not, the result is notified to the AND 407. The AND 407 detects a case where all the differences calculated by the subtraction units 401, 402, and 403 are not zero, and notifies the identification number determination unit 408 of the result.
[0014]
The identification number determination unit 408 holds an identification number that uniquely identifies each of the four inputs of the determination result output from the zero determination units 404, 405, and 406 and the output of the AND 407, and the identification number corresponding to the input one Is output to the multiplexing unit 409. Note that the assignment of the identification number may be fixed or dynamically changed according to the change in the appearance frequency.
[0015]
The multiplexing unit 409 is one of the predictors of the first prediction unit 20, the second prediction unit 21, and the third prediction unit 22 when any of the determination results of the zero determination units 404, 405, and 406 is zero. Whether or not hit is correct, an identification number corresponding to this is output. When the output of the AND 407 is detected, that is, when any of the predictors of the first predictor 20, the second predictor 21, and the third predictor 22 is not correct, the corresponding identification number and prediction FIG. 6A in which the error 120 is multiplexed and the prediction situation data 130 is output to the encoding unit 50 is a diagram illustrating the configuration of the prediction situation data 130. This is composed of only the identification number of the prediction unit that has been predicted correctly, or an identification number indicating that neither has been hit and the prediction error data 120.
[0016]
The encoding unit 50 performs variable length encoding by replacing the identification number of the prediction situation data 130 with a corresponding variable length code word.
[0017]
FIG. 7B is a diagram for explaining an example of assignment of variable length codes to identification numbers.
[0018]
In the configuration of the predictor in FIG. 7A, when the pixel values of the surrounding pixels a, b, c, and d are used as predicted values as they are, the prediction accuracy is a>b>c>d> (all predictions). And the identification number determination unit 408 determines the identification numbers in descending order of occurrence probability from 0, 1, 2,. . . Is assigned, the code table of FIG. 7B is obtained. The variable-length codeword is determined by configuring a tree of Huffman codes shown in FIG. 7C for the identification numbers arranged in the order of occurrence probability.
[0019]
FIG. 6C shows code data 140 obtained by variable-length coding the prediction status data 130 shown in FIG. 6B.
[0020]
The code output unit 60 outputs the code data 140 to a transmission path (not shown) or storage means.
[0021]
With the above configuration and operation, the image signal is reversibly encoded by the image encoding device in the prior art.
[0022]
[Problems to be solved by the invention]
A CG (computer graphics) image has a feature that (1) the pixel value used is often biased to a specific value, and (2) the same pixel value is often present in an adjacent pixel. Many.
[0023]
In the related technology described above, the efficiency of the CG image is obtained by encoding an identification number of a predictor that predicts the same pixel value as the target pixel by using such characteristics, and by encoding a prediction error when prediction is lost. Lossless encoding was realized. At this time, in order to further increase the coding efficiency, a variable-length code corresponding to the hit rate is assigned to each predictor.
[0024]
However, the related technology has the following problems.
[0025]
For example, consider a case where codeword lengths i, j, and k (natural numbers where i ≦ j <k) are assigned and three predictors are used. If the predictors of codeword length i and j have the same prediction value and these predictions are correct, a codeword of length i with a short code length is always selected from the viewpoint of compression, No codeword is chosen.
[0026]
On the other hand, when the predictors of the codeword lengths i and j have the same predicted value and the prediction is not correct, the predictor to which the codeword length k is assigned may be correct. Although the code word having the length j is not used, the code word having the length k is used as it is.
[0027]
The present invention has been made in view of the above-described circumstances, and an object thereof is to provide a lossless encoding apparatus and decoding apparatus having a high compression rate for computer-generated images including images described in PDL. It is.
[0028]
[Means for Solving the Problems]
According to claim 1 of the present invention, in order to solve the above-described problem, the image input means for inputting an image and the pixel value of the target pixel as an encoding target in the image input by the image input means are different from each other. A plurality of prediction means for predicting by a prediction method; a prediction error calculation means for calculating an error between a pixel value of a target pixel in an image input by the image input means and a prediction value predicted by a predetermined prediction method; A match determination unit that determines whether or not a pixel value predicted by a plurality of prediction units and a pixel value of a target pixel match, and a prediction by any one of the plurality of prediction units by the match determination unit selection means when the pixel value and the pixel value of the pixel of interest that match, outputs the prediction means is determined that the match, if not determined that the match for selecting and outputting the error In the image coding apparatus comprising: encoding means for encoding the identification information and error output by the selection means; and output means for outputting the code encoded by the encoding means, the plurality of predictions It is determined that at least one prediction result of the means coincides and the predicted pixel values of at least two prediction means determined to be inconsistent are equal, and the encoding means includes identification information corresponding to each prediction means. It is characterized by comprising determination means for determining that the assignment of the binary sequence in the encoding means is to be changed based on the length of the given variable-length binary sequence.
[0029]
Further, among the plurality of prediction means, a variable length binary sequence of length k (k is a natural number) is included in the identification information of the prediction means in which the predicted pixel value matches the pixel value of the target pixel. Among the plurality of prediction means, there are a plurality of pixel values predicted by the prediction means in which the predicted pixel value does not match the pixel value of the target pixel, and these When a binary sequence shorter than the length k is assigned in the encoding means, the identification means of the prediction means is shorter than the length k when a notification of binary sequence assignment change is received from the determination means. The pixel value which predicted the longest binary sequence among the binary sequences and the pixel value of the target pixel are assigned to the identification information of the prediction means. Further, in a manner described later with reference to FIG. 3, the length of the binary sequence assigned to the identification information of the prediction means in which the predicted pixel value and the pixel value of the target pixel match is the binary sequence. A binary sequence shorter than the length k allocated to a part of the identification information of each of the plurality of prediction means having the same predicted pixel value so as to be shorter than the length before the allocation change is used as the predicted pixel. You may assign to the identification information of the other prediction means of several prediction means with an equal value.
[0030]
Further, according to claim 2 of the present invention, prior Symbol encoding means and wherein the configuring the code and variable-length coding the binary sequence of Huffman code as a code word.
[0032]
The coincidence determining unit may match the predicted pixel value with the pixel value of the target pixel when an error between the pixel value predicted by the prediction unit and the pixel value of the target pixel is within a predetermined threshold. You may make it judge that it is.
[0033]
According to the above configuration, as well as encoding the identification number of the prediction unit in which the prediction is correct among the plurality of prediction units as in the related art, the plurality of prediction units perform the same prediction, and Focusing on the occurrence of codewords that are not used when the prediction is out of order, the codeword can be reassigned to reduce this redundancy, so that the compression rate can be further increased.
[0034]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, the concept of the present invention will be described. First, the premise of the description will be described.
[0035]
In the following description, the predictor having the configuration shown in FIG. 7A is used, and the pixel values of the peripheral pixels a, b, c, and d of the target pixel X are used as predicted values, as in the prior art section. The predictive hit rate is assumed to be a>b>c>d> (probability that all predictions are lost), and the identification numbers are 0, 1, 2,. . . Shall be assigned. However, these are assumptions for explanation, and do not limit the present invention.
[0036]
Based on the above assumption, the Huffman code tree shown in FIG. 7C is constructed for the identification numbers arranged in the order of occurrence probability, and the correspondence table of the identification numbers and variable-length codewords shown in FIG. 7B is obtained. .
[0037]
FIG. 2 is a diagram illustrating the state of the pixels in the predictor.
[0038]
As shown in FIG. 2A, when the reference pixels b and c and the target pixel X have the same color (vertical line region), the reference pixel b matches the target pixel X, and therefore, the 2-bit code word “10”. Is output. Although the target pixel c has the same color, the code word output when this pixel is adopted is “110” of 3 bits, so that it is not selected for the purpose of encoding.
[0039]
FIG. 2B shows a reference pixel when decoding the pixel of interest X in FIG. When decoding the pixel of interest X, if the reference pixels b and c are the same color (vertical line area), the reference pixel may be the code word “10” indicating the same color as the reference pixel b. The code word “110” indicating the same color as c can be excluded for the reason described above.
[0040]
As shown in FIG. 2C, the reference pixels b and c are the same color (vertical line area), and the reference pixel d and the target pixel X are the same color (diagonal line area) different from the reference pixels b and c. ).
[0041]
In this case, a 4-bit code word “1110” indicating a match with the reference pixel d is output. However, as described above, since the code word “110” indicating the match with the reference pixel c is not used, it can be temporarily reassigned as a code indicating the match with the reference pixel d. . In decoding, 1-bit information is reduced by making the same arrangement.
[0042]
FIG. 3 shows combinations in which bits can be reduced when four predictors (reference pixels) are used. The table in FIG. 7B is used for the correspondence between the predictor and the code word.
[0043]
When the prediction of the predictor of the first column in FIG. 3 is correct and the prediction errors of the predictors shown in the second column match, the codeword of the third column can be changed. It represents the number of bits to be reduced.
[0044]
For example, when the predictor 2 matches the target pixel, when the predictors 0 and 1 (a and b) match in colors different from these, the code “10” assigned to the predictor 1 is Since it is not used, it can be used instead of the code word “110” assigned to the predictor 2.
[0045]
FIG. 4 shows the results of measuring how much the case where the conditions shown in FIG. 3 are satisfied occurs in an actual image. For the measurement, two types of CG images described in PDL were used. Image A is a geometric pattern composed of straight lines, and image B is an LSI wiring diagram. The number of pixels is 3312 × 4680, and the K component of the color space YMCK is used.
[0046]
The code amount reduced from the sum of products of the number of bits reduced under each condition shown in FIG. 3 and the number of occurrences of each condition in images A and B shown in FIG. 4 can be obtained. In the case of image A, the code amount of 341,080 bits (42,635 bytes) is reduced, and in the case of image B, the code amount of 669,427 bits (83,678 bytes) is reduced.
[0047]
【Example】
A first embodiment of the present invention will be described.
[0048]
FIG. 1 is a block diagram for explaining the configuration of the first embodiment of the present invention. In addition, about the structure same as the structure of the prior art shown by FIG. 8, the same number is attached | subjected and description is abbreviate | omitted.
[0049]
In the same figure, 410 detects a state corresponding to the condition of FIG. 3 based on the prediction error signal output from the subtraction units 401, 402, and 403 and the correspondence information between the prediction unit and the identification number in the identification number determination unit 408. And a determination unit that outputs the code change information to the encoding unit 50.
[0050]
Next, the operation will be described based on the flowchart of FIG.
[0051]
First, the determination unit 410 detects an identification number output by the identification number determination unit 408, that is, a predictor that performs prediction that matches the target pixel and satisfies the condition of the first column in the table of FIG. 3 (FIG. 5). -S1).
[0052]
Next, the determination unit 410 obtains correspondence information between the prediction unit and the identification number from the identification number determination unit 408, and determines the second column of the table in FIG. 3, “a combination of predictors for comparing predicted values” ( FIG. 5-S2).
[0053]
Further, the determination unit 410 reads the prediction errors of the combination prediction units determined in FIG. 5-S2 from the prediction errors output from the subtraction units 401, 402, 403, respectively (FIG. 5-S3), and determines whether they match. Determination is made (FIG. 5-S4).
[0054]
If they match, the encoding unit 50 is notified of the change of the code word in the third column in the table of FIG. 3 (FIG. 5-S5).
[0055]
With the above configuration and operation, image coding is performed by the image coding apparatus of the present invention.
[0056]
Since the decoding operation is more obvious than the encoding operation, description thereof is omitted.
[0057]
The number of predictors and the prediction formula are not limited to these.
[0058]
Alternatively, the binary sequence assigned to the identification number of the correct predictor may be a variable length code, which may be multiplexed and output as code data 140, or the assigned binary sequence may be arithmetically encoded, Code data 140 may be generated as output.
[0059]
Further, when the error between the predicted pixel value and the pixel value of the target pixel is within a predetermined threshold, it may be determined that the predicted pixel value matches the pixel value of the target pixel. .
[0060]
【The invention's effect】
As described above, according to the present invention, as well as encoding a prediction unit in which a prediction is correct among a plurality of prediction units as in the prior art, a plurality of prediction units perform the same prediction, and Focusing on the occurrence of codewords that are not used when the prediction is off, re-assigning codewords can increase the compression rate.
[0061]
The specific effect of the present invention largely depends on the content of the image to be encoded and how to assign the variable length code. However, as described in the section of the embodiment, the code amount for the actual image The reduction effect is confirmed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a first exemplary embodiment of the present invention.
FIG. 2 is an explanatory diagram of a pixel arrangement.
FIG. 3 is a diagram for explaining reassignment of codes.
FIG. 4 is a diagram for explaining an occurrence frequency in an actual image.
FIG. 5 is a flowchart for explaining the operation;
FIG. 6 is a diagram illustrating a data configuration.
FIG. 7 is an explanatory diagram of encoding.
FIG. 8 is a block diagram showing a configuration of a conventional technique.
[Explanation of symbols]
10: Image input unit,
20 ... 1st prediction part,
21 ... 2nd prediction part,
22 ... Third prediction unit,
30 ... Prediction error calculation unit,
40 ... selection part,
50: Encoding unit,
51. Decoding unit,
60: Code output unit,
100: image data,
110 ... predicted value data,
120 ... prediction error data,
130 ... Predicted situation data,
140: Code data,
401, 402.403 ... subtractor,
404, 405, 406 ... Zero determination unit,
407 ... AND,
408 ... identification number determination unit,
409 ... multiplexing unit,
410 ... determination unit

Claims (3)

画像を入力する画像入力手段と、前記画像入力手段により入力した画像内の符号化対象である注目画素の画素値をそれぞれ異なる予測手法で予測する複数の予測手段と、前記画像入力手段により入力した画像内の注目画素の画素値と所定の予測手法で予測された予測値との誤差を算出する予測誤差算出手段と、前記複数の予測手段により予測した画素値と注目画素の画素値とが一致するか否かを判断する一致判断手段と、前記一致判断手段により、前記複数の予測手段のうちいずれかの予測手段により予測した画素値と注目画素の画素値とが一致した場合には、前記一致すると判断された予測手段を出力し、前記一致すると判断されない場合には上記誤差を選択して出力する選択手段と、前記選択手段により出力された識別情報及び誤差を符号化する符号化手段と、前記符号化手段により符号化された符号を出力する出力手段とを備えた画像符号化装置において、
前記複数の予測手段の少なくとも一つの予測結果が前記注目画素の画素値と一致し、かつ、前記注目画素の画素値と不一致と判定された少なくとも二つの予測手段の予測した画素値が等しいことを判定し、前記符号化手段において各々の予測手段に対応する識別情報に付与される可変長2進系列の長さに基づいて前記符号化手段における2進系列の割当て変更を行なうと判定する判定手段を備え、
前記符号化手段において、前記複数の予測手段のうちで、予測した画素値と注目画素の画素値とが一致する予測手段の識別情報に長さk(kは自然数)の可変長2進系列が割当てられている時に、
前記複数の予測手段のうちで、予測した画素値と注目画素の画素値とが一致しなかった予測手段で予測した画素値が等しいものが複数存在し、かつ、これらの予測手段の識別情報が前記符号化手段において長さkよりも短い2進系列が割当てられる場合、
前記符号化手段において各々の予測手段に対応する識別情報に付与される可変長2進系列の長さに基づいて前記符号化手段における2進系列の割当て変更を行なうと判定した前記判定手段から2進系列の割当て変更の通知を受けた時に、予測した画素値と注目画素の画素値とが一致する予測手段の識別情報に割当てられる2進系列の長さが、2進系列の割り当て変更前の長さより短くなるように、予測した画素値が等しい複数の予測手段のそれぞれの識別情報のうち一部に割り当てられていた前記長さkより短い2進系列を、前記予測した画素値が等しい複数の予測手段の他の予測手段の識別情報に割り当てることを特徴とする画像符号化装置。
An image input means for inputting an image, a plurality of prediction means for predicting the pixel value of the target pixel to be encoded in the image input by the image input means by different prediction methods, and input by the image input means A prediction error calculation unit that calculates an error between a pixel value of a target pixel in the image and a predicted value predicted by a predetermined prediction method, and a pixel value predicted by the plurality of prediction units and a pixel value of the target pixel match When the pixel value predicted by any one of the plurality of prediction units matches the pixel value of the target pixel by the match determination unit that determines whether or not to match, The prediction means determined to match is output, and if it is not determined to match, the selection means for selecting and outputting the error, and the identification information and error output by the selection means are encoded. In the image encoding apparatus having coding means, and output means for outputting the encoded code by the encoding means of,
That at least one prediction result of the plurality of prediction means matches the pixel value of the target pixel, and the predicted pixel values of at least two prediction means determined to be inconsistent with the pixel value of the target pixel are equal. Determining means for determining to change the assignment of the binary sequence in the encoding means based on the length of the variable length binary sequence given to the identification information corresponding to each prediction means in the encoding means With
In the encoding means, among the plurality of prediction means, a variable length binary sequence of length k (k is a natural number) is included in the identification information of the prediction means in which the predicted pixel value and the pixel value of the target pixel match. When assigned
Among the plurality of prediction means, there are a plurality of the same pixel values predicted by the prediction means in which the predicted pixel value does not match the pixel value of the target pixel, and the identification information of these prediction means is When a binary sequence shorter than length k is allocated in the encoding means,
From the determination means that the encoding means determines to change the assignment of the binary sequence in the encoding means based on the length of the variable length binary sequence given to the identification information corresponding to each prediction means. When the binary sequence allocation change notification is received, the length of the binary sequence assigned to the identification information of the prediction means in which the predicted pixel value matches the pixel value of the target pixel is the same as that before the binary sequence assignment change. A plurality of binary sequences shorter than the length k assigned to a part of the identification information of each of the plurality of prediction means having the same predicted pixel value so as to be shorter than the length are equal to each other. An image encoding apparatus characterized by assigning to identification information of other prediction means .
前記可変長2進系列はハフマン符号であることを特徴とする請求項1に記載の画像符号化装置。  The image encoding apparatus according to claim 1, wherein the variable length binary sequence is a Huffman code. 前記一致判断手段は、前記予測手段により予測した画素値と注目画素の画素値との間の誤差が所定の閾値以内のときに上記予測した画素値と注目画素の画素値とが一致していると判断する請求項1または2に記載の画像符号化装置。The coincidence determining unit matches the predicted pixel value with the pixel value of the target pixel when an error between the pixel value predicted by the prediction unit and the pixel value of the target pixel is within a predetermined threshold. the image coding apparatus according to claim 1 or 2 determines that.
JP17335697A 1997-06-30 1997-06-30 Image encoding device Expired - Lifetime JP3855376B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17335697A JP3855376B2 (en) 1997-06-30 1997-06-30 Image encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17335697A JP3855376B2 (en) 1997-06-30 1997-06-30 Image encoding device

Publications (2)

Publication Number Publication Date
JPH1127679A JPH1127679A (en) 1999-01-29
JP3855376B2 true JP3855376B2 (en) 2006-12-06

Family

ID=15958899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17335697A Expired - Lifetime JP3855376B2 (en) 1997-06-30 1997-06-30 Image encoding device

Country Status (1)

Country Link
JP (1) JP3855376B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4013716B2 (en) 2002-09-19 2007-11-28 富士ゼロックス株式会社 Image processing device
KR100813958B1 (en) * 2004-06-07 2008-03-14 세종대학교산학협력단 Method of lossless encoding and decoding, and apparatus thereof

Also Published As

Publication number Publication date
JPH1127679A (en) 1999-01-29

Similar Documents

Publication Publication Date Title
JP2888186B2 (en) Image encoding device and image decoding device
US6310980B1 (en) Encoding apparatus and method and storage medium
US7079057B2 (en) Context-based adaptive binary arithmetic coding method and apparatus
US5960116A (en) Image processing apparatus and method for performing prediction data encoding
US5151949A (en) System and method employing multiple predictor sets to compress image data having different portions
US20050249283A1 (en) Image coding apparatus and image decoding apparatus and their control methods, and computer program and computer-readable storage medium
US20060262982A1 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US20050152610A1 (en) Image encoding apparatus, image decoding apparatus, and their control method, and computer program and computer-readable storage medium
US5933105A (en) Context-based arithmetic encoding/decoding method and apparatus
US8116373B2 (en) Context-sensitive encoding and decoding of a video data stream
US6744925B2 (en) Encoding apparatus, decoding apparatus, encoding method, and decoding method
US5198898A (en) Data compressing system for compressing serial image data with color information
JPH06232765A (en) Variable length coding method
JP3855376B2 (en) Image encoding device
JP2000513195A (en) Method and apparatus for data compression
US6873737B2 (en) Image encoding system, image decoding system and methods therefor
US6636641B1 (en) Encoding apparatus, decoding apparatus, encoding method and decoding method
KR100281328B1 (en) Context-based Arithmetic Coding / Decoding Method and Apparatus
JP3837850B2 (en) Image coding method and apparatus
JP2891818B2 (en) Encoding device
JP2809161B2 (en) Predictive coding device
US6681049B1 (en) Image encoding method and apparatus
JP3308940B2 (en) Encoding method and decoding method
CA2221288C (en) Encoding apparatus, decoding apparatus, encoding method, decoding method, and picture processing apparatus
JP2000092333A (en) Image coding and decoding device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20020613

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050201

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050328

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051122

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060119

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060822

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060904

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050328

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100922

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110922

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120922

Year of fee payment: 6