JPH10327418A - Image coder - Google Patents

Image coder

Info

Publication number
JPH10327418A
JPH10327418A JP13623197A JP13623197A JPH10327418A JP H10327418 A JPH10327418 A JP H10327418A JP 13623197 A JP13623197 A JP 13623197A JP 13623197 A JP13623197 A JP 13623197A JP H10327418 A JPH10327418 A JP H10327418A
Authority
JP
Japan
Prior art keywords
pixel
prediction
image
rank
encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP13623197A
Other languages
Japanese (ja)
Inventor
Shunichi Kimura
俊一 木村
Yutaka Koshi
裕 越
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
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 filed Critical Fuji Xerox Co Ltd
Priority to JP13623197A priority Critical patent/JPH10327418A/en
Publication of JPH10327418A publication Critical patent/JPH10327418A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To attain efficient compression independently of a natural image or an artificial image. SOLUTION: A pixel extract section 103 extracts a pixel at a lower right of a block as a coded pixel as a 1st stage. As a 2nd stage, the block is divided into four sublocks uniform both longitudinally and laterally, and the pixel at a lower right of a sub block is extracted. Similarly the sub block is further divided into four and the pixel at lower right is extracted. In the case of 8×8 block, all pixel are extracted in the 4th stage. The pixel value 105 of the extracted reference pixel is fed to prediction devices 106-108 and a prediction error calculation section 109. Furthermore, the pixel value 104 of the coded pixel is fed to a selection section 115 and a prediction error calculation device 109. When the predicted result and the pixel value 104 of the coded pixel are determined as identical by a selection section 115, a coding section 116 codes the order of the prediction devices and when a predicted value is not correct, the prediction error is coded.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像符号化装置に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding device.

【0002】[0002]

【従来の技術】画像は一般に非常に大量のデータとなる
ので、蓄積や伝送の際には符号化によって圧縮するのが
一般的である。このとき画像符号化の対象となる画像デ
ータを2つに大別すると、例えば自然画像と人工画像と
に分けられる。
2. Description of the Related Art Since an image generally contains a very large amount of data, it is general to compress the image by encoding when storing or transmitting the image. At this time, if image data to be subjected to image encoding is roughly classified into two, for example, it is divided into a natural image and an artificial image.

【0003】前者は実在する画像を何らかの手段でデジ
タルデータに変換したもので、例えば写真をスキャナで
読み取ったり、風景をデジタルカメラで取り込んだもの
がこれに相当する。後者は実在しない画像を何らかの手
段でデジタルデータとして作成したもので、例えばコン
ピュータ・グラフィックスやワードプロセッサによって
作られた原稿等がこれに相当する。以降、自然画像、人
工画像という言葉はこの定義で用いる。
[0003] The former is a method in which an existing image is converted into digital data by some means. For example, a photograph is read by a scanner or a landscape is captured by a digital camera. The latter is an image in which a non-existent image is created as digital data by some means. For example, an original created by computer graphics or a word processor corresponds to this. Hereinafter, the terms natural image and artificial image are used in this definition.

【0004】一般的に自然画像はデジタル変換時にノイ
ズが重畳され、高域成分が劣化する傾向がある。この結
果として、得られるデジタルデータは下位ビットの情報
量が多く、使われる色数も多い。また周波数分析すると
成分が低域に集中しやすく、高域は減衰する。
In general, noise is superimposed on a natural image at the time of digital conversion, and the high frequency component tends to deteriorate. As a result, the obtained digital data has a large amount of information of lower bits and a large number of colors used. Also, when frequency analysis is performed, the components tend to be concentrated in the low band, and the high band is attenuated.

【0005】逆に人工画像は故意にノイズを加えた場合
を除いて下位ビットの情報量は多くなく、使われる色も
特定色に集中しやすい。またエッジや細線等がシャープ
に出るため、高域にも重要な情報が多く含まれる。
On the other hand, the artificial image does not have a large amount of information of lower bits except for a case where noise is intentionally added, and the colors used are likely to concentrate on a specific color. Also, since edges and fine lines appear sharply, important information is also included in high frequencies.

【0006】以上の事実を確認する2つの実験例を図1
9に示す。第1の実験としてDCT(離散コサイン変
換:Discrete Cosine Transfo
rm)処理によって得られる係数に対して、個別に2乗
平均して平方根をとった値をいくつかの画像について調
べた。この結果を同図(a)のように8つのエリア別に
加算した結果を同図(b)に示す。DCT係数は左上か
ら右下にいくにつれ周波数が高くなるように表記するの
で、同図(b)ではx軸で右側が高い周波数にあたる。
同図から明らかなように自然画像は高域になるに従って
成分が減少するのに対し、人工画像は周波数にかかわら
ず成分が分布する。
FIG. 1 shows two experimental examples for confirming the above facts.
9 As a first experiment, DCT (Discrete Cosine Transform: Discrete Cosine Transform)
rm) The values obtained by individually averaging the squares and taking the square root of the coefficients obtained by the processing were examined for some images. The result obtained by adding the result for each of the eight areas as shown in FIG. Since the DCT coefficient is described such that the frequency increases from the upper left to the lower right, the right side on the x axis corresponds to the higher frequency in FIG.
As can be seen from the figure, the components of the natural image decrease as the frequency becomes higher, whereas the components of the artificial image are distributed regardless of the frequency.

【0007】第2の実験は画像から隣り合った画素値を
取り出し、左側の画素値を右側の画素値から減算した結
果の統計をとった。これは一般には前値差分等と呼ばれ
る値である。図19(c)は第2の実験結果である。同
図から明らかなように人工画像では自然画像に比較して
前値差分が0に集中する。これは左側の画素値から右側
の画素値を予測する前値予測の予測精度が高くなること
を示す。
In the second experiment, adjacent pixel values were extracted from the image, and statistics of the result obtained by subtracting the left pixel value from the right pixel value were obtained. This is a value generally called a previous value difference or the like. FIG. 19C shows the result of the second experiment. As is clear from the figure, the previous value difference concentrates on 0 in the artificial image as compared to the natural image. This indicates that the prediction accuracy of the previous value prediction for predicting the right pixel value from the left pixel value increases.

【0008】以下、自然画像と人工画像のそれぞれに対
して有効な画像符号化手法をそれぞれ第1、第2の従来
例として述べる。
Hereinafter, image coding methods effective for natural images and artificial images will be described as first and second conventional examples, respectively.

【0009】まず第1の従来例として自然画像に対する
従来の符号化技術について説明する。もともと自然画像
は情報量が非常に多いので、何らかの手法で情報を量子
化することが必要になる。そこで量子化の効率について
考えた場合、自然画像は周波数成分が低域に集中するの
で、低域を細かく、高域を粗く量子化することにより、
平均誤差を小さくした量子化が実現できる。すなわち、
画質への影響を極力少なくし、かつ効率的に情報量を削
減することができる。
First, as a first conventional example, a conventional encoding technique for a natural image will be described. Since natural images originally have a very large amount of information, it is necessary to quantize the information by some method. Therefore, when considering the efficiency of quantization, natural images concentrate frequency components in the low band, so by quantizing the low band finely and the high band coarsely,
Quantization with a reduced average error can be realized. That is,
The effect on image quality can be minimized and the amount of information can be efficiently reduced.

【0010】画像符号化の一手法である周波数変換符号
化はこの特性を利用し、入力画像を周波数変換し高域成
分の情報を特に粗く量子化する。周波数変換符号化の代
表例としては、例えば国際標準であるJPEG(Joi
nt Photographic Experts G
roup)のDCT方式があげれられる。以下、第1の
従来例としてJPEG−DCT方式について説明する。
Frequency conversion coding, which is one method of image coding, utilizes this characteristic to perform frequency conversion on an input image and quantize high-frequency component information particularly coarsely. As a typical example of frequency conversion coding, for example, JPEG (Joi) which is an international standard
nt Photographic Experts G
loop) DCT method. Hereinafter, the JPEG-DCT method will be described as a first conventional example.

【0011】第1の従来例の説明に入る前にDCTにつ
いて説明する。画像符号化で用いられるDCTは正確に
は二次元DCTと呼ばれるもので、横方向と縦方向の2
つの一次元DCTを独立に処理することによって求めら
れる。”カラー静止画像の国際標準符号化方式−JPE
Gアルゴリズム−”(遠藤、インターフェース、199
1.12、pp160−182)によれば、変換する画
像ブロックをx(m,n)、変換された係数ブロックを
y(u,v)と表記すると、8bit画像に対する8×
8のDCTの変換式と逆変換式は次のようにかける。
Prior to the description of the first conventional example, DCT will be described. The DCT used in image coding is exactly what is called a two-dimensional DCT.
It is determined by processing one one-dimensional DCT independently. "International Standard Coding for Color Still Images-JPE
G algorithm-"(Endo, Interface, 199
According to 1.12, pp. 160-182), when an image block to be transformed is represented by x (m, n) and a transformed coefficient block is represented by y (u, v), 8 ×
The DCT transform equation and the inverse transform equation are applied as follows.

【0012】[0012]

【数1】 図20(a)および(b)はそれぞれ第1の従来例の画
像非可逆符号化装置、復号装置の構成例である。同図は
前出”カラー静止画像の〜”p.163の図3を部分的
に抜き出し、用語を修正したものである。図中、200
1は画像入力部、2003はDCT部、2005は係数
量子化部、2007は係数出力部、2002は入力画像
データ、2004は係数データ、2006は量子化係数
データ、2008は係数入力部、2009は量子化係数
データ、2012は逆DCT部、2014は復号画像出
力部、2010は係数逆量子化部、2013は復号画像
データ、2011は逆量子化係数データである。
(Equation 1) FIGS. 20A and 20B are configuration examples of a first conventional image lossy encoding device and a decoding device, respectively. FIG. 163 is partially extracted from FIG. 3 and the terms are modified. In the figure, 200
1 is an image input unit, 2003 is a DCT unit, 2005 is a coefficient quantization unit, 2007 is a coefficient output unit, 2002 is input image data, 2004 is coefficient data, 2006 is quantized coefficient data, 2008 is a coefficient input unit, and 2009 is a coefficient input unit. Quantized coefficient data, 2012 is an inverse DCT unit, 2014 is a decoded image output unit, 2010 is a coefficient inverse quantization unit, 2013 is decoded image data, and 2011 is inverse quantized coefficient data.

【0013】図20(a)および(b)の各部について
説明する。図20(a)の符号化装置は以下の構成より
なる。画像入力部2001は外部より画像を入力し、入
力画像データ2002としてDCT部2003へ送出す
る。DCT部2003は入力画像データ2002にDC
T処理を行い、その結果を係数データ2004として係
数量子化部2005へ送出する。係数量子化部2005
は係数データ2004に対して予め定められた方法で量
子化処理を行い、量子化係数データ2006として係数
出力部2007へ送出する。係数出力部2007は量子
化係数データ2006を外部へ出力する。
Each part of FIGS. 20A and 20B will be described. The encoding device in FIG. 20A has the following configuration. The image input unit 2001 receives an image from the outside and sends it to the DCT unit 2003 as input image data 2002. The DCT unit 2003 converts the input image data 2002
The T processing is performed, and the result is sent to the coefficient quantization unit 2005 as coefficient data 2004. Coefficient quantization unit 2005
Performs a quantization process on the coefficient data 2004 by a predetermined method, and sends the result to the coefficient output unit 2007 as quantized coefficient data 2006. The coefficient output unit 2007 outputs the quantized coefficient data 2006 to the outside.

【0014】次に図20(b)の復号装置は以下の構成
よりなる。係数入力部2008は外部より係数を入力
し、量子化係数データ2009として係数逆量子化部2
010へ送出する。係数逆量子化部2010は量子化係
数データ2009に対して係数量子化部2005で行わ
れた量子化の逆変換となるような逆量子化を行い、逆量
子化係数データ2011として逆DCT部2012へ送
出する。逆DCT部2012は逆量子化係数データ20
11に対してDCT部2003で行われたDCT処理の
逆変換となる逆DCT処理を行い、その結果を復号画像
データ2013として復号画像出力部2014へ送出す
る。復号画像出力部2014は復号画像データ2013
を外部へ出力する。
Next, the decoding device shown in FIG. 20B has the following configuration. A coefficient input unit 2008 receives a coefficient from the outside and outputs the coefficient as a quantized coefficient data 2009.
010. The coefficient inverse quantization unit 2010 performs inverse quantization on the quantized coefficient data 2009 so as to be an inverse transform of the quantization performed by the coefficient quantization unit 2005, and generates an inverse DCT unit 2012 as inverse quantized coefficient data 2011. Send to The inverse DCT unit 2012 calculates the inverse quantized coefficient data 20
11 is subjected to an inverse DCT process, which is an inverse transform of the DCT process performed by the DCT unit 2003, and the result is sent to the decoded image output unit 2014 as decoded image data 2013. The decoded image output unit 2014 outputs the decoded image data 2013.
Is output to the outside.

【0015】以上の構成は第1の従来例の一部であり、
通常は符号化装置では量子化係数データ2006にHu
ffman符号やQM符号等の可変長符号化処理を行
い、復号装置では可変長符号化処理に対応する復号を行
って量子化係数データ2009を得るのが一般的な構成
である。これらの部分は本発明の本質とは関係がなく、
またこの部分の省略が第1の従来例の本質を損なうもの
でもないので、ここでは説明を省略する。
The above configuration is a part of the first conventional example,
Normally, in the encoding device, the quantization coefficient data 2006 contains Hu
It is a general configuration that a variable length encoding process such as an ffman code or a QM code is performed, and a decoding device performs decoding corresponding to the variable length encoding process to obtain quantized coefficient data 2009. These parts have nothing to do with the essence of the present invention,
Since the omission of this portion does not impair the essence of the first conventional example, the description is omitted here.

【0016】以上の構成に基づいて第1の従来例の動作
について説明する。図21(a)および(b)は従来例
の動作を示すフローチャートである。
The operation of the first conventional example based on the above configuration will be described. FIGS. 21A and 21B are flowcharts showing the operation of the conventional example.

【0017】まず図21(a)を用いて第1の従来例の
符号化手順について説明する。S10では画像入力部2
001において外部より画像の入力を行い、入力画像デ
ータ2002を得る。S20ではDCT部2003にお
いてDCT処理を行い、係数データ2004を得る。S
35では係数量子化部2005において係数データ20
04に対して予め定められた方法で量子化処理を行い、
量子化係数データ2006を得る。S75では係数出力
部2007において量子化係数データ2006を外部へ
出力する。S80では入力された入力画像データ200
2の処理が全て終了したかどうかを判定し、終了してい
なければS10へ戻り、終了していれば符号化手順を終
了する。
First, the encoding procedure of the first conventional example will be described with reference to FIG. In S10, the image input unit 2
In step 001, an image is input from outside to obtain input image data 2002. In S20, DCT processing is performed in the DCT unit 2003 to obtain coefficient data 2004. S
In 35, the coefficient data 20
04 is subjected to a quantization process by a predetermined method,
The quantization coefficient data 2006 is obtained. In S75, the coefficient output unit 2007 outputs the quantized coefficient data 2006 to the outside. In S80, the input image data 200
It is determined whether or not all of the processes of Step 2 have been completed, and if not completed, the process returns to S10, and if completed, the encoding procedure ends.

【0018】次に図12(b)を用いて第1の従来例の
復号手順について説明する。S115では係数入力部2
008において外部より係数の入力を行い、量子化係数
データ2009を得る。S125では係数逆量子化部2
010において逆量子化処理を行い、逆量子化係数デー
タ2011を得る。S130では逆DCT部2012に
おいて逆量子化係数データに対して逆DCT処理を行
い、復号画像データ2013を得る。S140では復号
画像出力部2014において復号画像データ2013を
外部へ出力する。S150では入力された量子化係数デ
ータ2009の処理が全て終了したかどうかを判定し、
終了していなければS115へ戻り、終了していれば復
号手順を終了する。
Next, the decoding procedure of the first conventional example will be described with reference to FIG. In S115, the coefficient input unit 2
In 008, coefficients are input from outside to obtain quantized coefficient data 2009. In S125, the coefficient inverse quantization unit 2
In step 010, an inverse quantization process is performed to obtain inverse quantization coefficient data 2011. In S130, the inverse DCT unit 2012 performs inverse DCT processing on the inverse quantization coefficient data to obtain decoded image data 2013. In S140, the decoded image output unit 2014 outputs the decoded image data 2013 to the outside. In S150, it is determined whether or not the processing of the input quantized coefficient data 2009 has been completed.
If not, the process returns to S115, and if completed, the decoding procedure is terminated.

【0019】以上の動作の中で係数量子化部2005で
行われる量子化処理について説明する。前述したように
一般の周波数変換符号化では、低域成分に比較して高域
成分を粗く量子化する。JPEG−DCT方式では次の
式の線形量子化を用いる。ここでroundは引数に最
も近い整数を返す関数である。
The quantization processing performed by the coefficient quantization unit 2005 in the above operation will be described. As described above, in general frequency conversion coding, a high frequency component is coarsely quantized compared to a low frequency component. In the JPEG-DCT method, the following equation is used for linear quantization. Here, round is a function that returns the integer closest to the argument.

【0020】[0020]

【数2】 図22はJPEG−DCT方式の推奨量子化テーブルで
ある(前出”カラー静止画像の国際標準符号化方式−J
PEGアルゴリズム−”p.167図9による)。同図
中の数字が量子化ステップを表し、数値が大きいほど粗
く量子化することに相当する。量子化テーブルは(1)
式のDCT係数同様に左上から右下に向かって周波数が
高くなるよう表記されるので、高域成分が特に粗く量子
化されていることになる。
(Equation 2) FIG. 22 shows a recommended quantization table of the JPEG-DCT method (see “International Standard Coding Method for Color Still Images-J.
PEG algorithm— "p.167" (refer to FIG. 9). The numbers in the figure represent quantization steps, and the larger the numerical value, the coarser the quantization. The quantization table is (1).
Similarly to the DCT coefficient in the equation, the frequency is described from the upper left to the lower right, so that the high-frequency component is quantized particularly coarsely.

【0021】次に第2の従来例として、人工画像に対す
る従来の符号化技術について説明する。人工画像では図
10(c)で示したように同じ色が空間的に局在して出
現することが多いので、周辺画素による画素値予測と予
測誤差の符号化を組み合せる予測符号化が有効である。
以下、予測符号化の代表例として前述の国際標準JPE
Gで定められた可逆符号化方式であるSpatial方
式を第2の従来例として説明する。Spatial方式
は可逆の符号化方式であり、人工画像に対してはDCT
方式よりも高い圧縮率を得ることができる。
Next, as a second conventional example, a conventional encoding technique for an artificial image will be described. In an artificial image, the same color often appears spatially localized as shown in FIG. 10C. Therefore, prediction coding that combines pixel value prediction with surrounding pixels and prediction error coding is effective. It is.
Hereinafter, as a representative example of predictive coding, the aforementioned international standard JPE
A Spatial system, which is a lossless encoding system defined by G, will be described as a second conventional example. The Spatial method is a reversible coding method, and DCT is used for artificial images.
It is possible to obtain a higher compression ratio than the method.

【0022】第2の従来例の具体的な説明に入る前に予
測符号化について説明する。予測符号化は次に符号化し
ようとする画素の画素値を予測し、次の式で得られる予
測誤差を符号化する手法である。
Prior to a specific description of the second conventional example, predictive coding will be described. The predictive coding is a method of predicting a pixel value of a pixel to be coded next, and coding a prediction error obtained by the following equation.

【0023】[0023]

【数3】 図19(b)に示したように人工画像では予測誤差が0
に集中するから、一般には自然画像よりも符号量を削減
することができる。また特に可逆の予測符号化は、符号
量制御ができない反面、画質が劣化する可能性はない。
(Equation 3) As shown in FIG. 19B, the prediction error is 0 in the artificial image.
Therefore, in general, the code amount can be reduced as compared with the natural image. In particular, lossless predictive coding cannot control the code amount, but does not degrade image quality.

【0024】以下、第2の従来例の具体的な説明を行
う。図23(a)および(b)はそれぞれ第2の従来例
の画像可逆符号化装置、復号装置の構成図である。同図
は”カラー静止画像の国際標準符号化方式−JPEGア
ルゴリズム−”p.173の図17を部分的に抜き出
し、復号装置を加え、用語を修正したものである。図
中、図20と同様の部分は同じ符号を付して説明を省略
する。2303は予測部、2305は予測誤差出力部、
2306は予測誤差入力部、2304は予測誤差データ
である。
Hereinafter, the second conventional example will be specifically described. FIGS. 23A and 23B are configuration diagrams of a second conventional image lossless encoding device and decoding device, respectively. The figure shows “International Standard Coding for Color Still Images—JPEG Algorithm—” p. 17 is partially extracted from FIG. 17, a decoding device is added, and terms are modified. In the figure, the same parts as those in FIG. 20 are denoted by the same reference numerals, and the description is omitted. 2303 is a prediction unit, 2305 is a prediction error output unit,
Reference numeral 2306 denotes a prediction error input unit, and reference numeral 2304 denotes prediction error data.

【0025】図23(a)および(b)の各部について
説明する。図23(a)の符号化装置は以下の構成より
なる。予測部2303は入力画像データ2002を用い
て次に符号化する画素値を予測し、実際の画素値との差
分を予測誤差データ2304として予測誤差出力部23
05へ送出する。
Each part of FIGS. 23A and 23B will be described. The encoding device in FIG. 23A has the following configuration. The prediction unit 2303 predicts a pixel value to be encoded next using the input image data 2002, and determines a difference from an actual pixel value as prediction error data 2304 as the prediction error output unit 23.
05.

【0026】図23(b)の復号装置は以下の構成より
なる。予測誤差入力部2306は予測誤差を外部より入
力し、予測誤差データ2304として予測部2303へ
送出する。予測部2303は符号化装置の予測部230
3と同一であるが、次の画素を予測のために復号した画
像を参照する点が異なる。
The decoding device shown in FIG. 23B has the following configuration. The prediction error input unit 2306 inputs a prediction error from outside and sends it to the prediction unit 2303 as prediction error data 2304. The prediction unit 2303 is a prediction unit 230 of the encoding device.
3, except that an image obtained by decoding the next pixel for prediction is referred to.

【0027】以上の構成に基づいて第2の従来例の動作
について説明する。図24(a)および(b)は従来例
の動作を示すフローチャートである。
The operation of the second conventional example will be described based on the above configuration. FIGS. 24A and 24B are flowcharts showing the operation of the conventional example.

【0028】まず図24(a)を用いて第2の従来例の
符号化手順について説明する。図12(a)と同様の部
分は同一の符号を付し、説明を省略する。S25では予
測部2303において(4)式より予測誤差を算出す
る。S76では予測誤差出力部2305においてS25
で算出した予測誤差データ2304を外部へ出力する。
First, the encoding procedure of the second conventional example will be described with reference to FIG. Parts similar to those in FIG. 12A are denoted by the same reference numerals, and description thereof will be omitted. In S25, the prediction unit 2303 calculates a prediction error from equation (4). In S76, the prediction error output unit 2305 executes S25.
Is output to the outside.

【0029】次に図24(b)を用いて第2の従来例の
復号手順について説明する。図21(b)と同様の部分
は同一の符号を付し、説明を省略する。S116では予
測誤差入力部2306において外部より予測誤差を入力
する。S135では予測部2303において予測値と予
測誤差の加算によって画素値を算出する。
Next, the decoding procedure of the second conventional example will be described with reference to FIG. Parts similar to those in FIG. 21B are denoted by the same reference numerals, and description thereof will be omitted. In S116, the prediction error is input from the outside in the prediction error input unit 2306. In S135, the prediction unit 2303 calculates a pixel value by adding the prediction value and the prediction error.

【0030】動作説明中、予測誤差算出処理について説
明する。JPEG−Spatial方式では図25に示
した7つの予測器のうち、どれか1つを使うように定め
られている。例えば予測式をaとした場合、これから符
号化する画素xの左隣りの画素値を予測値とすればよ
い。
In the description of the operation, the prediction error calculation processing will be described. In the JPEG-Spatial system, one of the seven predictors shown in FIG. 25 is determined to be used. For example, when the prediction formula is a, the pixel value on the left of the pixel x to be encoded may be set as the prediction value.

【0031】以上第1、第2の従来例を説明したが、以
下ではいずれか単独では自然画像と人工画像の区別なく
効率的に符号化するのは難しいことを示す。
Although the first and second conventional examples have been described above, it will be described below that it is difficult to efficiently encode a natural image and an artificial image without any distinction.

【0032】人工画像では高域成分にも重要な情報が含
まれるので、図22のように高域が粗い量子化を行うと
画質劣化、例えばモスキート・ノイズが発生する。図2
2(a)に示した量子化テーブルによって発生したモス
キート・ノイズの例を図26(a)および(b)に示
す。同図(a)が入力画像、同図(b)が復号画像であ
る。このようなノイズのためにJPEG−DCT方式の
ような周波数変換符号化では、人工画像に対して画質を
維持したまま符号量を削減することが難しい。この様子
を図27に示す。
In an artificial image, important information is also included in the high-frequency component. Therefore, if the high-frequency quantization is performed as shown in FIG. 22, the image quality deteriorates, for example, mosquito noise occurs. FIG.
FIGS. 26A and 26B show examples of mosquito noise generated by the quantization table shown in FIG. FIG. 3A shows an input image, and FIG. 3B shows a decoded image. Due to such noise, it is difficult to reduce the code amount in the frequency conversion coding such as the JPEG-DCT method while maintaining the image quality of the artificial image. This is shown in FIG.

【0033】一方、自然画像はノイズの影響で近隣画素
同士でも画素値が異なるため、JPEG−Spatia
l方式のような可逆の予測符号化では符号量が小さくな
らない。この様子を図28に示す。また可逆符号化は画
質と符号量をトレード・オフにできないので、符号量制
御ができない。これは蓄積媒体の容量や通信帯域等に直
接影響するので、システムの構築を難しくする。
On the other hand, a natural image has different pixel values even between neighboring pixels due to the influence of noise, so that JPEG-Spatia
The code amount does not decrease in lossless predictive coding such as the 1-method. This state is shown in FIG. Further, in lossless encoding, since the image quality and the code amount cannot be traded off, the code amount cannot be controlled. This directly affects the capacity of the storage medium, the communication band, and the like, and makes it difficult to construct a system.

【0034】また、JPEG−Spatial方式のよ
うなラスタスキャンで予測を行う方式では、図25に示
されるように、参照領域が既に符号化を終えた左または
上の画素に限られる。すなわち、予測可能な画素の方向
が限られているため、予測の効率が上がらない。これ
は、自然画像、人工画像共に言える。
In a method of performing prediction by raster scanning such as the JPEG-Spatial method, as shown in FIG. 25, the reference area is limited to the left or upper pixel which has already been encoded. That is, since the directions of the pixels that can be predicted are limited, the efficiency of prediction does not increase. This can be said for both natural images and artificial images.

【0035】このように第1、第2の従来例では有効に
符号化できない画像が存在する。この問題を解決するた
めに非可逆符号化と可逆符号化とを部分毎に使い分ける
手法が考えられる。そのような例として特開平6−11
3145号公報の手法がある。以下、第3の従来例とし
てこの公報の手法について説明する。
As described above, there are images that cannot be effectively encoded in the first and second conventional examples. In order to solve this problem, a method of selectively using irreversible encoding and lossless encoding for each part can be considered. As such an example, Japanese Patent Laid-Open Publication No.
There is a method disclosed in Japanese Patent No. 3145. Hereinafter, the method of this publication will be described as a third conventional example.

【0036】図29は第3の従来例の画像処理装置の構
成図である。同図は特開平6−113145号公報の主
旨を損なわないよう、該公報の図1の一部を省略し、用
語を修正したものである。図中、2901は人工画像入
力部、2910は自然画像入力部、2903人工画像符
号化部、2912は自然画像符号化部、2905は人工
画像記憶部、2914は自然画像記憶部、2907は人
工画像復号部、2916は自然画像復号部、2909は
画像合成部、2902は入力人工画像データ、2911
は入力自然画像データ、2904は人工画像符号デー
タ、2913は自然画像符号データ、2908は復号人
工画像データ、2917は復号自然画像データである。
FIG. 29 is a configuration diagram of a third conventional image processing apparatus. In this figure, a part of FIG. 1 of the publication is omitted and terms are modified so as not to impair the gist of JP-A-6-113145. In the figure, 2901 is an artificial image input unit, 2910 is a natural image input unit, 2903 is an artificial image encoding unit, 2912 is a natural image encoding unit, 2905 is an artificial image storage unit, 2914 is a natural image storage unit, and 2907 is an artificial image Decoding unit, 2916 is a natural image decoding unit, 2909 is an image synthesis unit, 2902 is input artificial image data, 2911
Is input natural image data, 2904 is artificial image code data, 2913 is natural image code data, 2908 is decoded artificial image data, and 2917 is decoded natural image data.

【0037】図29の各部について説明する。人工画像
入力部2901および自然画像入力部2910はそれぞ
れ外部より人工画像、自然画像を入力し、入力人工画像
データ2902、入力自然画像データ2911として人
工画像符号化部2903、自然画像符号化部2912へ
送出する。人工画像符号化部2903および自然画像符
号化部2912はそれぞれ入力人工画像データ290
2、入力自然画像データ2911にそれぞれに予め定め
られた手法で符号化を行い、人工画像符号データ290
4、自然画像符号データ2913として、人工画像記憶
部2905、自然画像記憶部2914へ送出する。人工
画像記憶部2905および自然画像記憶部2914はそ
れぞれ人工画像符号データ2904、自然画像符号デー
タ2913を一時的に記憶し、それぞれ人工画像復号部
2907、自然画像復号部2916へ送出する。人工画
像復号部2907および自然画像復号部2916はそれ
ぞれ人工画像符号化部2903、自然画像符号化部29
12で行われた符号化に対応する復号処理を人工画像符
号データ2904、自然画像符号データ2913に対し
て行い、復号人工画像データ2908、復号自然画像デ
ータ2917として画像合成部2909へ送出する。画
像合成部2909は復号人工画像データ2908と復号
自然画像データ2917の合成を行う。
Each part of FIG. 29 will be described. An artificial image input unit 2901 and a natural image input unit 2910 input an artificial image and a natural image from outside, respectively, and input the artificial image data 2902 and the input natural image data 2911 to the artificial image encoding unit 2903 and the natural image encoding unit 2912, respectively. Send out. The artificial image encoding unit 2903 and the natural image encoding unit 2912 respectively input the artificial image data 290
2. Encoding is performed on the input natural image data 2911 by a predetermined method, and the artificial image code data 290 is obtained.
4. It is sent to the artificial image storage unit 2905 and the natural image storage unit 2914 as natural image code data 2913. The artificial image storage unit 2905 and the natural image storage unit 2914 temporarily store the artificial image code data 2904 and the natural image code data 2913, respectively, and send them to the artificial image decoding unit 2907 and the natural image decoding unit 2916, respectively. The artificial image decoding unit 2907 and the natural image decoding unit 2916 respectively include an artificial image coding unit 2903 and a natural image coding unit 29.
A decoding process corresponding to the encoding performed in step S12 is performed on the artificial image code data 2904 and the natural image code data 2913, and the resultant is sent to the image combining unit 2909 as decoded artificial image data 2908 and decoded natural image data 2917. The image combining unit 2909 combines the decoded artificial image data 2908 and the decoded natural image data 2917.

【0038】動作については説明を省略する。The description of the operation is omitted.

【0039】以上の説明の中で人工画像符号化部290
3で行われる符号化は、該公報の第1実施例において
「ランレングス符号化方式等の可逆方式の機能を持つ」
という記述がされている。また自然画像符号化部291
2で行われる符号化は、やはり該公報の第1実施例にお
いて「JPEG等の画像圧縮方式」という記述がされて
いる。なお該特許でいうJPEGとは本説明でいうJP
EG−DCT方式のことを指す。
In the above description, the artificial image coding unit 290
The encoding performed in step 3 has a function of a lossless system such as a run-length encoding system in the first embodiment of the publication.
Is described. Also, the natural image encoding unit 291
2 is described in the first embodiment of the publication as "an image compression method such as JPEG". Note that JPEG in this patent is JP in this description.
Refers to the EG-DCT method.

【0040】[0040]

【発明が解決しようとする課題】以上で示されたよう
に、第1の従来例は自然画像を対象として設計されてお
り、入力画像を変換し、信号電力が大であり、かつ、視
覚上重要な低周波領域の係数を細かく量子化することで
高能率な符号化特性を得ている。しかしながら、第1の
従来例はエッジの多い人工画像に対しては、モスキート
ノイズ等の符号化歪みが発生してしまう。また、同一画
素値の連続する画像では、高い圧縮率の可逆符号化が可
能であるのに対し、変換によって画素値が変化してしま
うため、予測符号化並みの圧縮率を得ることができな
い。
As described above, the first conventional example is designed for a natural image, converts an input image, has a large signal power, and has a visual effect. Highly efficient coding characteristics are obtained by finely quantizing important low-frequency region coefficients. However, in the first conventional example, coding distortion such as mosquito noise occurs for an artificial image having many edges. Further, in a continuous image having the same pixel value, lossless encoding with a high compression rate is possible, but the pixel value changes due to conversion, so that a compression rate comparable to predictive encoding cannot be obtained.

【0041】また、第2の従来例は、同一の画素値が連
続する人工画像の場合、予測誤差が0となり、高い圧縮
率を得ることができるが、自然画像に対しては、上と左
の画素のみを用いて予測を行っているため、予測効率を
高くすることができない。また、周波数軸上の視覚特性
を利用して高能率な冗長度削減を行うことができない。
In the second conventional example, in the case of an artificial image in which the same pixel values are consecutive, the prediction error is 0 and a high compression ratio can be obtained. Since the prediction is performed using only the pixels of the above, the prediction efficiency cannot be increased. In addition, it is not possible to perform highly efficient redundancy reduction using visual characteristics on the frequency axis.

【0042】すなわち、第1の従来例、第2の従来例で
は、単独の符号化方式で、自然画像にも人工画像にも効
率的な符号化を行うことができない。
That is, in the first conventional example and the second conventional example, efficient coding cannot be performed on a natural image or an artificial image by a single coding method.

【0043】第3の従来例においては自然画像と人工画
像が全く異なる方式で並列に符号化復号されるため、一
般には両処理の処理時間が一致しない。このため符号化
時は全ての符号データが、復号時は全ての画像データが
出揃うまで外部に出力することができなくなり、符号化
装置には最低1画像分の符号バッファが、また復号装置
にも最低1画像分の画像バッファが必要となる。これら
は1系統の方式しか持たない画像符号化復号装置であれ
ば不要な構成である。
In the third conventional example, since natural images and artificial images are encoded and decoded in parallel by completely different methods, the processing times of both processes generally do not match. For this reason, all the code data cannot be output to the outside at the time of encoding until all the image data are available at the time of decoding, and the encoding device has a code buffer for at least one image, and the decoding device also has An image buffer for at least one image is required. These are unnecessary configurations if the image encoding / decoding apparatus has only one system.

【0044】また符号化装置、復号装置共に2系統以上
持つので、装置規模の増大を招く。さらに全く異なる複
数の符号で画像を表現するため、伝送や蓄積の際などに
符号の取扱いが複雑になる。
Since both the encoding device and the decoding device have two or more systems, the size of the device is increased. Further, since an image is represented by a plurality of completely different codes, handling of the codes becomes complicated at the time of transmission and storage.

【0045】本発明は上述した事情に鑑みてなされたも
ので、自然画像と人工画像の区別なく、効率的な圧縮が
可能な単一の符号化装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and has as its object to provide a single encoding device capable of efficiently compressing a natural image and an artificial image without distinction.

【0046】[0046]

【課題を解決するための手段】以下、本発明を説明す
る。さて従来のJPEG等の符号化方式が圧縮可能なの
は、視覚特性に適応した周波数領域の量子化を行ってい
るからである。本発明は、このような周波数に適応した
歪み量の分配を、可逆の描画方向予測符号化に適用しよ
うとするものである。すなわち本発明は一種の非分割型
サブバンド符号化と把握することもできる。本発明は、
以上の観点から、画素値が連続する性質を用いて符号化
を行う予測符号化でありながら、周波数領域に応じた冗
長度削減が可能な符号化装置を実現するものである。
Hereinafter, the present invention will be described. Now, the conventional encoding method such as JPEG is compressible because the quantization in the frequency domain adapted to the visual characteristics is performed. The present invention intends to apply such a distribution of distortion amount adapted to a frequency to lossless drawing direction prediction encoding. That is, the present invention can be understood as a kind of non-division type subband coding. The present invention
In view of the above, it is an object of the present invention to provide an encoding device that is capable of performing redundancy reduction in accordance with a frequency domain, while performing predictive encoding in which encoding is performed using the property of continuous pixel values.

【0047】つぎに本発明の概要を説明する。本発明
は、予測符号化の一種であり、符号化は、既に符号化さ
れた参照画素が、符号化画素の上下左右にあるような順
序で粗い画像(低周波数の画像)から細かい画像(高周
波数の画像)へ順に行う。
Next, the outline of the present invention will be described. The present invention is a type of predictive coding. In the coding, the reference pixels that have already been coded are shifted from a coarse image (low-frequency image) to a fine image (high- Frequency image).

【0048】そして、既に符号化された周囲の参照画素
を用いた複数の予測器の中から、予測が的中する予測器
を選択して符号化する。予測器自体を符号化するのでは
なく、予測器の的中確率を予測し、その的中確率の高い
順に順位付けした時の順位を符号化する。的中する予測
器がない場合は、予測誤差を符号化する。この時、予測
誤差を許容して予測器を選択することによって非可逆符
号化を行う。予測誤差を許容するか許容しないかの閾値
は、画像の細かさによって変化する。
Then, from among a plurality of predictors using surrounding reference pixels that have already been coded, a predictor to which prediction is appropriate is selected and coded. Instead of coding the predictor itself, it predicts the hit probability of the predictor, and codes the ranking when the hit probability is higher. If there is no correct predictor, the prediction error is encoded. At this time, lossy encoding is performed by selecting a predictor while allowing a prediction error. The threshold for allowing or disallowing the prediction error changes depending on the fineness of the image.

【0049】入力画像は、複数の画像の細かさの段階
(周波数)に分けて符号化される。図18に各画像の段
階の参照画素と、対応する周波数領域を示す。図18
(a)は各段階の参照画素を示す。第1段階では、他の
矩形領域の画素を参照する(図示しない)。第2段階で
は、図18(a)に示されるような画素を参照する。次
の段階ではさらに細かい(近接した)画素を参照して符
号化を行う。
The input image is encoded by dividing into a plurality of image fineness stages (frequency). FIG. 18 shows reference pixels at the stage of each image and corresponding frequency regions. FIG.
(A) shows reference pixels at each stage. In the first stage, pixels in other rectangular areas are referred to (not shown). In the second stage, reference is made to a pixel as shown in FIG. In the next step, encoding is performed with reference to finer (closer) pixels.

【0050】図18(b)では、各段階の画像が対応す
る2次元周波数領域を示す。第4段階は最も高い周波数
の領域であり、第1段階は最も周波数の低い領域に対応
している。
FIG. 18B shows a two-dimensional frequency domain to which the image of each stage corresponds. The fourth stage corresponds to the highest frequency region, and the first stage corresponds to the lowest frequency region.

【0051】そのため、本発明は、予測誤差を許容する
か許容しないかの閾値、すなわち、歪み量の分配を画像
の周波数に適応して行うことができ、この結果、一般に
低域に電力が集中する自然画像に適した符号化を行うこ
とができる。また、視覚特性に適応した符号化を行うこ
とができる。
Therefore, according to the present invention, the threshold value for permitting or disallowing the prediction error, that is, the distribution of the distortion amount can be performed in accordance with the frequency of the image. As a result, power is generally concentrated in the low band. Encoding suitable for a natural image to be processed. Further, encoding suitable for visual characteristics can be performed.

【0052】また、本発明は、入力画像の画素値を変換
せずにそのまま予測して符号化を行う。そのため、第2
の従来例の性質と同様に、同一の画素値が連続する人工
画像の場合、予測誤差が0となり、高い圧縮率を得るこ
とができ、第1の従来例よりも高い符号化効率を得るこ
とができる。
According to the present invention, the encoding is performed by predicting the pixel value of the input image without conversion. Therefore, the second
In the case of an artificial image in which the same pixel values are continuous, the prediction error becomes 0, a high compression rate can be obtained, and a higher encoding efficiency can be obtained than in the first conventional example. Can be.

【0053】また、本発明は、入力画像を分割領域に分
割して、分割領域の画素を予測して符号化を行う。粗い
画像から、細かな画像となるような順で分割領域内の画
素の符号化を行う。これによって、上と左のみではな
く、右と下の画素を予測に用いることができる。
Further, according to the present invention, the input image is divided into divided areas, and the pixels in the divided areas are predicted and encoded. The pixels in the divided area are coded in order from a coarse image to a fine image. As a result, not only the upper and left pixels but also the right and lower pixels can be used for prediction.

【0054】また、従来のラスタスキャンでは近接する
画素は高々4画素(左、左上、上、右上)であるが、最
大近接8画素(左、左上、上、右上、右、左下、下、右
下)を参照画素として用いることができる。
In the conventional raster scan, the number of adjacent pixels is at most four (left, upper left, upper, upper right), but the maximum number of adjacent pixels is eight (left, upper left, upper, upper right, right, lower left, lower, right). Bottom) can be used as a reference pixel.

【0055】自然画像では、図19に示されるように、
低域周波数の電力が大であり、これは、近接する参照画
素が多いほど予測効率が上がることを意味している。上
と左のみではなく、その他の、右と下の画素を予測に用
いることによって、第2の従来例よりも効率の良い画素
値予測が可能となる。
In a natural image, as shown in FIG.
The power of the low frequency is large, which means that the prediction efficiency increases as the number of reference pixels closer to each other increases. By using not only the upper and left pixels but also other right and lower pixels for prediction, it is possible to perform pixel value prediction more efficiently than in the second conventional example.

【0056】また、本発明は、予測器の的中確率を予測
し、その的中確率の高い順に順位付けした時の順位を符
号化する。これにより、より発生確率の高い事象に対し
て短い符号語を割当てることができる。
Further, according to the present invention, the hit probability of the predictor is predicted, and the order when the hit probability is higher is encoded. Thereby, a short codeword can be assigned to an event having a higher occurrence probability.

【0057】また、本発明は、予測器が実際に的中しな
い場合でも、的中したとみなすことによって、非可逆符
号化を実現する。さらに、予測誤差を量子化することに
よって、非可逆符号化を実現する。これによって、可逆
符号化である第2の従来例よりも効率的な符号化が可能
となる。
Further, the present invention realizes irreversible coding by assuming that a predictor has hit a target even if the predictor does not actually hit the target. Furthermore, lossy coding is realized by quantizing the prediction error. This enables more efficient encoding than the second conventional example of lossless encoding.

【0058】さらに、本発明は、可逆の場合は、予測の
誤差を許容しないだけであるため、ハードウエアの変更
なく、容易に可逆と非可逆の双方を実現できる。そのた
め、可逆符号化に適した人工画像と、非可逆符号化に適
した自然画像を単一の符号化装置で効率的に符号化でき
る。
Further, the present invention does not allow a prediction error in the case of reversibility, so that both reversibility and irreversibility can be easily realized without changing hardware. Therefore, an artificial image suitable for lossless encoding and a natural image suitable for irreversible encoding can be efficiently encoded by a single encoding device.

【0059】つぎに本発明の構成についてまとめて説明
する。
Next, the configuration of the present invention will be described.

【0060】まず、本発明によれば、上述の目的を達成
するために、画像符号化装置に、入力画像の少なくとも
一部を一時記憶する画像記憶手段と、上記画像記憶手段
に記憶された画像の画素を、所定の規則に基づいて大き
さおよび位置が決定される、上記画素を内包する分割領
域に対応づけ、大きな分割領域に対応する画素から小さ
な分割領域に対応する画素へと順に符号化対象画素を選
択し、選択された上記符号化対象画素と、上記符号化対
象画素に対応する分割領域内あるいは上記分割領域に隣
接する分割領域内のすでに符号化されている参照画素と
を抽出する画素抽出手段と、上記参照画素の画素値を用
いて、上記符号化対象画素の画素値を予測するか、また
は、上記符号化対象画素の画素値と、上記参照画素の画
素値を用いて予測した画素値との間の予測誤差を算出す
る複数の予測手段と、上記複数の予測手段の選択可能性
の順位を記憶する予測手段順位記憶手段と、前記複数の
予測手段の中から、1の予測手段を選択する選択手段
と、選択した予測手段の情報をもとに上記予測手段順位
記憶手段に記憶されている予測手段の順位を変更する予
測手段順位変更手段と、選択された予測手段順位あるい
は、予測手段順位と予測誤差とを符号化する符号化手段
とを設けるようにしている。
First, according to the present invention, in order to achieve the above object, an image encoding device temporarily stores at least a part of an input image, and an image stored in the image storage device. Pixels are associated with a divided area that includes the above pixels, the size and position of which are determined based on a predetermined rule, and the pixels corresponding to the large divided areas are sequentially encoded from the pixels corresponding to the small divided areas. A target pixel is selected, and the selected encoding target pixel and an already encoded reference pixel in a divided region corresponding to the encoding target pixel or in a divided region adjacent to the divided region are extracted. Estimating the pixel value of the encoding target pixel using the pixel extracting means and the pixel value of the reference pixel, or estimating using the pixel value of the encoding target pixel and the pixel value of the reference pixel A plurality of prediction means for calculating a prediction error between the calculated pixel value, a prediction means rank storage means for storing a selectivity rank of the plurality of prediction means, and one of the plurality of prediction means. Selecting means for selecting the predicting means; predicting means order changing means for changing the order of the predicting means stored in the predicting means order storage means based on information of the selected predicting means; Alternatively, an encoding means for encoding the prediction means rank and the prediction error is provided.

【0061】この構成においては、画像を大きな領域か
ら小さな領域へと予測参照画素の範囲を変化させること
により、上下左右の種々の方位の隣接画素を参照画素と
して用いることが可能になり、より予測が正確となる。
また、予測手段を選択することにより符号化するので、
人工画像の符号化にも適している。さらに予測参照画素
の範囲(矩形領域)の大小に応じて許容誤差を最適化す
ることにより、歪み量の分配を画像の周波数分布に応じ
て選定でき、自然画像の圧縮も効率よく行うことができ
る。
In this configuration, by changing the range of predicted reference pixels from a large area to a small area in an image, it is possible to use adjacent pixels in various directions, up, down, left, and right, as reference pixels. Will be accurate.
In addition, since encoding is performed by selecting a prediction unit,
Also suitable for coding of artificial images. Further, by optimizing the allowable error according to the size of the range (rectangular area) of the prediction reference pixels, the distribution of the distortion amount can be selected according to the frequency distribution of the image, and the natural image can be compressed efficiently. .

【0062】ここで、入力画像の一部とは、最低、画像
抽出手段で分割される分割領域と、画像抽出手段で抽出
される参照画素を含む画素領域である。
Here, a part of the input image is at least a divided area divided by the image extracting means and a pixel area including reference pixels extracted by the image extracting means.

【0063】また、この構成において、復号画像を算出
する復号画像算出手段をさらに具備し、上記画像記憶手
段は、上記復号画像をさらに記憶し、上記選択手段は、
上記予測画素値と上記符号化対象画素の画素値とが等し
くない場合であっても、対応する予測手段を選択し、上
記復号画像算出手段は、復号される画素値を算出し、上
記画像記憶手段に復号画像を記憶し、上記画素抽出手段
は、上記参照画素として、上記画像記憶手段に記憶され
た復号画像の画素値を抽出するようにしてもよい。この
場合、画像記憶手段は、復号画像算出手段によって算出
された復号画像で、既に記憶された入力画像の画素値を
書き換えるか、または、復号画像専用の領域に復号画像
を記憶する。予測手段は、復号画像算出手段で算出され
た復号画像の画素値を用いて予測を行う。そして予測誤
差を許容して予測手段を選択することで非可逆符号化を
行う。
In this configuration, the apparatus further comprises a decoded image calculating means for calculating a decoded image, wherein the image storage means further stores the decoded image, and the selecting means comprises
Even when the predicted pixel value is not equal to the pixel value of the encoding target pixel, a corresponding prediction unit is selected, the decoded image calculation unit calculates a pixel value to be decoded, and The decoded image may be stored in the means, and the pixel extracting means may extract a pixel value of the decoded image stored in the image storing means as the reference pixel. In this case, the image storage unit rewrites the pixel values of the input image already stored with the decoded image calculated by the decoded image calculation unit, or stores the decoded image in an area dedicated to the decoded image. The prediction unit performs prediction using the pixel value of the decoded image calculated by the decoded image calculation unit. Then, irreversible encoding is performed by selecting a prediction unit while allowing a prediction error.

【0064】また、上記選択手段は、予測画素値と上記
符号化対象画素の画素値とが等しい予測手段のうちで、
最も予測手段順位の高い予測手段を選択し、全ての予測
手段の予測結果が上記符号化対象画素の画素値と異なる
場合には予測誤差を算出する予測手段を選択するように
してもよい。
In addition, the selecting means is one of the predicting means in which the predicted pixel value is equal to the pixel value of the encoding target pixel.
The prediction unit having the highest prediction unit rank may be selected, and when the prediction results of all the prediction units are different from the pixel values of the encoding target pixels, the prediction unit that calculates the prediction error may be selected.

【0065】また、上記選択手段は、予測手段順位の高
い順に、上記予測手段の予測値と、上記符号化対象画素
の画素値とを比較し、その差分の絶対値が所定の値より
小さい時にはその予測手段を選択し、全ての予測手段の
差分の絶対値が所定の値より小さくない場合には予測誤
差を算出する予測手段を選択するようにしてもよい。
The selecting means compares the predicted value of the predicting means with the pixel value of the encoding target pixel in the descending order of the predicting means, and when the absolute value of the difference is smaller than a predetermined value. If the prediction means is selected and the absolute value of the difference between all the prediction means is not smaller than a predetermined value, a prediction means for calculating a prediction error may be selected.

【0066】また、上記選択手段は、所定の予測手段の
予測値と、上記符号化対象画素の画素値とを比較し、そ
の差分の絶対値が所定の値より小さい時にはその予測手
段を選択し、それ以外の場合は、予測画素値と上記符号
化対象画素の画素値とが等しい予測手段のうちで、最も
予測手段順位の高い予測手段を選択し、全ての予測手段
の予測結果が符号化を行う画素の画素値と異なる場合に
は予測誤差を算出する予測手段を選択するようにしても
よい。
The selecting means compares the predicted value of the predetermined predicting means with the pixel value of the pixel to be coded, and selects the predicting means when the absolute value of the difference is smaller than the predetermined value. Otherwise, among the prediction means having the same predicted pixel value and the pixel value of the encoding target pixel, the prediction means having the highest prediction means rank is selected, and the prediction results of all the prediction means are coded. If the pixel value is different from the pixel value of the pixel on which the prediction is performed, a prediction unit that calculates the prediction error may be selected.

【0067】また、画素誤差拡散手段をさらに具備し、
上記画素誤差拡散手段は、入力参照画素と、復号参照画
素との差分を重み付けして加算し、さらに上記符号化対
象画素の画素値に加算し、その結果を符号化対象画素の
画素値とするようにしてもよい。この場合、変化した符
号化を行う画素の画素値を、もともとの入力画素値であ
ったとして、他の手段は画素誤差拡散手段がない場合と
同様の動作を行う。
Further, a pixel error diffusion means is further provided.
The pixel error diffusion means weights and adds the difference between the input reference pixel and the decoded reference pixel, further adds the weight to the pixel value of the encoding target pixel, and sets the result as the pixel value of the encoding target pixel. You may do so. In this case, assuming that the pixel value of the changed pixel to be coded is the original input pixel value, the other units perform the same operation as when there is no pixel error diffusion unit.

【0068】また、予測誤差量子化手段をさらに具備
し、上記予測誤差量子化手段は、所定の量子化係数によ
って、予測誤差を量子化するようにしてもよい。この場
合、予測誤差量子化を行って圧縮率を高めることができ
る。
Further, the apparatus may further comprise a prediction error quantization means, wherein the prediction error quantization means quantizes the prediction error using a predetermined quantization coefficient. In this case, the compression ratio can be increased by performing prediction error quantization.

【0069】また、上記予測手段は、参照画素の画素値
を予測値とするようにしてもよい。
Further, the prediction means may set the pixel value of the reference pixel as the prediction value.

【0070】また、上記予測手段は、複数の参照画素の
画素値の線形和を予測値とするようにしてもよい。線形
和は、複数の参照画素の画素値に画素値の相対位置に応
じた係数を掛けてその和をとったものである。
Further, the prediction means may be configured to use a linear sum of pixel values of a plurality of reference pixels as a prediction value. The linear sum is obtained by multiplying the pixel values of a plurality of reference pixels by a coefficient corresponding to the relative position of the pixel value, and taking the sum.

【0071】また、上記画素抽出手段は、上記符号化対
象画素の分割領域内の相対位置に応じて、参照画素の位
置および数を変化させるようにしてもよい。この場合、
分割領域は、入力画像を重なりなく覆うことのできる長
方形のN×M画素の領域であり、その中の全ての画素を
符号化を行う画素として画素抽出手段は抽出する。個々
の符号化を行う画素を符号化するために参照する、参照
画素の位置と数は予め定めておく。そして参照画素は既
に符号化された画素である。
Further, the pixel extracting means may change the position and number of reference pixels according to the relative position of the encoding target pixel in the divided area. in this case,
The divided area is a rectangular area of N × M pixels that can cover the input image without overlapping, and the pixel extracting unit extracts all of the pixels as pixels to be encoded. The position and the number of reference pixels to be referred to for coding each pixel to be coded are determined in advance. The reference pixels are already encoded pixels.

【0072】また、上記予測手段順位変更手段は、予測
誤差を算出する予測手段の予測手段順位を固定とするよ
うにしてもよい。この場合、予測誤差を算出する予測手
段が選択された時の符号が常に等しい。
Further, the prediction means rank changing means may fix the prediction means rank of the prediction means for calculating the prediction error. In this case, the sign when the prediction means for calculating the prediction error is selected is always equal.

【0073】また、上記予測手段順位変更手段は、予測
誤差を算出する予測手段の予測手段順位を、他の予測手
段と同様に変化させるようにしてもよい。この場合、予
測誤差を算出する予測手段の選択可能性が大きな場合は
小さな符号語、選択可能性が小さな場合は大きな符号語
が割当てられる。
The prediction means rank changing means may change the prediction means rank of the prediction means for calculating the prediction error in the same manner as other prediction means. In this case, a small codeword is assigned when the selectability of the prediction means for calculating the prediction error is large, and a large codeword is assigned when the selectability is small.

【0074】また、上記画像抽出手段は、上記画像記憶
手段に記憶された画像を縦および横が2のN乗の画素数
の矩形領域に分割し、第1の符号化画素を、該矩形領域
の右下の画素として抽出し、第2の符号化画素を、該矩
形領域を縦横均等に4分割した右下の画素として抽出
し、さらに、矩形領域を縦横均等に4分割してできる矩
形領域の右下の画素を矩形領域が1×1画素の大きさに
なるまで次々と抽出するようにしてもよい。画像抽出手
段は、入力画像を重なりなく覆うことのできる長方形の
N×M画素の領域として矩形領域を分割し、その矩形領
域内の画素を全て抽出する。その矩形領域内の画素は全
て抽出される。
The image extracting means divides the image stored in the image storing means into rectangular areas each having 2 × N pixels in the vertical and horizontal directions, and divides the first coded pixels into the rectangular areas. Is extracted as a lower right pixel, and a second coded pixel is extracted as a lower right pixel obtained by equally dividing the rectangular area into four in the vertical and horizontal directions. Further, the rectangular area is formed by equally dividing the rectangular area into four in the vertical and horizontal directions. May be successively extracted until the rectangular area has a size of 1 × 1 pixel. The image extracting means divides the rectangular area into a rectangular area of N × M pixels that can cover the input image without overlapping, and extracts all the pixels in the rectangular area. All the pixels in the rectangular area are extracted.

【0075】また、上記予測手段順位記憶手段は、符号
化を行う画素と参照画素の位置関係によって、別々の順
位を記憶し、上記予測手段順位変更手段は、符号化を行
う画素と参照画素の位置関係によって、変更する順位を
変えるようにしてもよい。
The prediction means rank storage means stores different ranks depending on the positional relationship between the pixel to be coded and the reference pixel, and the prediction means rank change means stores the rank of the pixel to be coded and the reference pixel. The order of change may be changed depending on the positional relationship.

【0076】また、上記予測手段順位変更手段は、直前
に選択された予測手段を順位1位とし、その他の予測手
段の順位は順次1づつ下げるようにしてもよい。
Further, the prediction means rank changing means may set the prediction means selected immediately before as the first rank and lower the ranks of the other prediction means sequentially by one.

【0077】また、上記予測手段順位変更手段は、事前
に選択された予測手段の頻度を記憶しておき、その頻度
に基づいて予測手段順位を決定するようにしてもよい。
Further, the prediction means rank changing means may store the frequency of the prediction means selected in advance and determine the prediction means rank based on the frequency.

【0078】また、上記予測手段は、参照画素値のうち
同一画素値の複数の参照画素の位置関係から予測を行う
ようにしてもよい。つまり、参照画素のうち、同じ画素
値となる画素の位置のパターンを検出して、予測画素値
を決定する。
Further, the prediction means may perform prediction from the positional relationship of a plurality of reference pixels having the same pixel value among the reference pixel values. That is, among the reference pixels, the pattern at the position of the pixel having the same pixel value is detected, and the predicted pixel value is determined.

【0079】また、上記選択手段は、上記予測手段によ
って、上記予測手段を選択するか選択しないかの所定の
値を変えるようにしてもよい。つまり、予測誤差を許容
する符号化の場合、選択手段では、予測手段での予測結
果と、符号化を行う画素の画素値を比較してその差分の
絶対値が所定の値より大きいか小さいかを判断するが、
この所定の値を、可逆に適した予測手段では小さく(あ
るいはゼロに)、非可逆に適した予測手段では大きくす
る。予測手段によって、適切に閾値を変化させる。
Further, the selection means may change a predetermined value for selecting or not selecting the prediction means by the prediction means. That is, in the case of encoding that allows a prediction error, the selecting unit compares the prediction result of the predicting unit with the pixel value of the pixel to be encoded and determines whether the absolute value of the difference is larger or smaller than a predetermined value. Judge,
This predetermined value is made small (or zero) by the prediction means suitable for reversibility, and made large by the prediction means suitable for irreversibility. The threshold is appropriately changed by the prediction means.

【0080】また、上記所定の予測手段は、符号化を行
う画素と参照画素の位置関係によって、異なるようにし
てもよい。この場合、各画素を符号化する際の予測手段
は複数存在するが、画素抽出手段で抽出する符号化を行
う画素の画素位置に応じて、予測手段が変化する。
Further, the predetermined predicting means may be different depending on the positional relationship between the pixel to be coded and the reference pixel. In this case, there are a plurality of prediction units when encoding each pixel, but the prediction unit changes according to the pixel position of the pixel to be encoded extracted by the pixel extraction unit.

【0081】また、上記所定の値は、符号化を行う画素
と参照画素の位置関係によって、異なるようにしてもよ
い。つまり、予測誤差を許容する符号化の場合、選択手
段では、予測手段での予測結果と、符号化を行う画素の
画素値を比較してその差分の絶対値が所定の値より大き
いか小さいかを判断するが、この所定の値を、符号化を
行う画素と参照画素の位置関係によって、画素値を予測
し易い(あるいはしにくい)場合には小さく、画素値を
予測し易い(あるいはしにくい)場合には大きくする。
符号化を行う画素と参照画素の位置関係によって適切に
閾値を変化させる。また、上記量子化係数は、符号化を
行う画素と参照画素の位置関係によって、異なるように
してもよい。予測誤差に関して量子化を行う場合、その
量子化係数すなわち、量子化ステップ幅を、符号化を行
う画素と予測誤差を算出する参照画素の位置関係によっ
て、画素値を予測し易い(あるいはしにくい)場合には
小さく、画素値を予測し易い(あるいはしにくい)場合
には大きくする。符号化を行う画素と参照画素の位置関
係によって適切に量子化ステップ幅を変化させる。
The predetermined value may be different depending on the positional relationship between the pixel to be coded and the reference pixel. That is, in the case of encoding that allows a prediction error, the selecting unit compares the prediction result of the predicting unit with the pixel value of the pixel to be encoded and determines whether the absolute value of the difference is larger or smaller than a predetermined value. Is determined, the predetermined value is small when the pixel value is easy to predict (or difficult to predict) based on the positional relationship between the pixel to be encoded and the reference pixel, and the pixel value is easy to predict (or difficult to perform). ) If it is large.
The threshold is appropriately changed depending on the positional relationship between the pixel to be encoded and the reference pixel. Further, the quantization coefficient may be different depending on the positional relationship between the pixel to be coded and the reference pixel. When quantization is performed on the prediction error, the quantization coefficient, that is, the quantization step width, is easily (or hardly) predicted based on the positional relationship between the pixel to be encoded and the reference pixel for calculating the prediction error. In this case, it is small, and when it is easy (or difficult) to predict the pixel value, it is increased. The quantization step width is appropriately changed depending on the positional relationship between the pixel to be encoded and the reference pixel.

【0082】また、上記画素抽出手段によって、分割さ
れる分割領域の最初に符号化を行う画素の符号化誤差を
許容しないようにしてもよい。すなわち、分割領域内で
最初に抽出される符号化を行う画素は、予測誤差を許容
する予測手段の選択は行わない。また、量子化を行わな
い。
The pixel extracting means may not allow a coding error of a pixel to be coded at the beginning of a divided area to be divided. In other words, the first pixel to be coded that is extracted in the divided area does not select a prediction unit that allows a prediction error. No quantization is performed.

【0083】また、参照画素のパターン決定手段をさら
に具備し、上記パターン決定手段は、参照画素の画素値
によって参照画素パターンを決定し、上記予測手段順位
記憶手段は、パターン毎に予測手段順位を記憶し、上記
予測手段順位変更手段では、パターン毎に予測手段順位
を変更するようにしてもよい。この場合、各パターン毎
に独立に予測順位を決定する。一種のマルコフモデル符
号化を行う。
Further, there is further provided a reference pixel pattern determining means, wherein the pattern determining means determines a reference pixel pattern based on a pixel value of the reference pixel, and the predicting means rank storing means determines a predicting means rank for each pattern. The prediction means rank changing means may store the prediction means rank for each pattern. In this case, the prediction order is determined independently for each pattern. Performs a kind of Markov model coding.

【0084】また、上記パターン決定手段は、同一画素
値となる参照画素の位置を調べるようにしてもよい。す
なわち、参照画素が、お互いに同一画素であるかないか
のみを検査し、パターンを決定する。
The pattern determining means may check the position of a reference pixel having the same pixel value. That is, the pattern is determined by checking only whether the reference pixels are the same pixel or not.

【0085】また、上記パターン決定手段は、参照画素
の画素値を平面で近似できるかどうか調べるようにして
もよい。
The pattern determining means may check whether the pixel value of the reference pixel can be approximated by a plane.

【0086】また、上記符号化手段は、上記選択手段で
選択を行った順に、1位となった予測手段順位のランレ
ングスと、1位以外の予測手段順位と、予測誤差とを符
号化するようにしてもよい。
The encoding means encodes the run length of the prediction means ranked first, the prediction means other than the first rank, and the prediction error in the order of selection by the selection means. You may do so.

【0087】また、上記符号化手段は、分割された分割
領域の最後の画素まで、全て予測手段順位が1位の場合
は、ランレングス符号化の代わりにブロック終端符号を
付加するようにしてもよい。
The encoding means may add a block end code in place of run-length encoding when the prediction means ranks first until the last pixel of the divided area. Good.

【0088】また、上記符号化手段は、上記選択手段で
選択を行った順に、1位以外の予測手段順位と、予測誤
差を符号化し、さらに、1位か、1位以外かの1ビット
の予測的中情報を分割領域毎に符号化するようにしても
よい。
The encoding means encodes the prediction means rank other than the first place and the prediction error in the order of selection by the selection means, and further encodes the first place or one bit other than the first place. Predictive hit information may be encoded for each divided area.

【0089】[0089]

【発明の実施の形態】以下、実施例に即して本発明を詳
細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to embodiments.

【0090】[実施例1]実施例1は、入力画像を矩形
領域毎に可逆で符号化する場合の例を示すものである。
以下、図1を用いて説明する。図1において、101は
入力画像、102は画像記憶部、103は画素抽出部、
104は抽出された符号化画素、105は抽出された参
照画素、106は第1の予測器、107は第2の予測
器、108は第Nの予測器、109は予測誤差算出器、
110は第1の予測結果、111は第2の予測結果、1
12は第Nの予測結果、113は予測誤差、114は予
測器順位記憶部、115は選択部、116は符号化部、
117は符号、118は予測器順位変更部である。
[Embodiment 1] Embodiment 1 shows an example in which an input image is losslessly encoded for each rectangular area.
This will be described below with reference to FIG. In FIG. 1, 101 is an input image, 102 is an image storage unit, 103 is a pixel extraction unit,
104 is an extracted coded pixel, 105 is an extracted reference pixel, 106 is a first predictor, 107 is a second predictor, 108 is an Nth predictor, 109 is a prediction error calculator,
110 is the first prediction result, 111 is the second prediction result, 1
12 is an N-th prediction result, 113 is a prediction error, 114 is a predictor rank storage unit, 115 is a selection unit, 116 is an encoding unit,
Reference numeral 117 denotes a code, and reference numeral 118 denotes a predictor rank changing unit.

【0091】つぎに、実施例1の動作について説明す
る。図1において、入力画像101は一旦画像記憶部1
02で記憶される。この時、画素抽出部103で必要と
なる符号化画素と、参照画素を含んだ領域が、最低限の
記憶領域である。画素抽出部103は画像記憶部102
から、符号化を行う画素を抽出する。以下、符号化を行
う画素を符号化画素とする。さらに、符号化画素の画素
値を予測するために必要な参照画素を抽出する。画素抽
出部の詳細な動作は後述する。
Next, the operation of the first embodiment will be described. In FIG. 1, an input image 101 is temporarily stored in an image storage unit 1.
02 is stored. At this time, the area including the coded pixels required by the pixel extraction unit 103 and the reference pixels is the minimum storage area. The pixel extraction unit 103 is an image storage unit 102
, A pixel to be coded is extracted. Hereinafter, a pixel to be coded is referred to as a coded pixel. Further, a reference pixel necessary for predicting the pixel value of the coded pixel is extracted. The detailed operation of the pixel extraction unit will be described later.

【0092】画素抽出部103で抽出された参照画素の
画素値105は第1予測器106、第2予測器107、
第N予測器108、予測誤差算出器109に送られる。
また、画素抽出部103で抽出された符号化画素の画素
値104は選択部115と、予測誤差算出器109に送
られる。
The pixel value 105 of the reference pixel extracted by the pixel extracting unit 103 is calculated by a first predictor 106, a second predictor 107,
It is sent to the Nth predictor 108 and the prediction error calculator 109.
Further, the pixel value 104 of the coded pixel extracted by the pixel extraction unit 103 is sent to the selection unit 115 and the prediction error calculator 109.

【0093】第1予測器106〜第N予測器108で
は、参照画素104を用いて符号化画素104を予測す
る。その予測結果110〜112は選択部115に送ら
れる。予測誤差算出器109では所定の予測器を用いて
符号化画素の画素値を予測し、その予測結果と符号化画
素の画素値の差分を計算し、予測誤差113として選択
部に送られる。第1予測器106〜第N予測器108
と、予測誤差算出器109の詳細な予測方法については
後述する。
The first predictor 106 to the N-th predictor 108 predict the coded pixel 104 using the reference pixel 104. The prediction results 110 to 112 are sent to the selection unit 115. The prediction error calculator 109 predicts the pixel value of the coded pixel using a predetermined predictor, calculates the difference between the prediction result and the pixel value of the coded pixel, and sends the difference as a prediction error 113 to the selection unit. First predictor 106 to Nth predictor 108
The detailed prediction method of the prediction error calculator 109 will be described later.

【0094】予測器順位記憶部114では、予測器が選
択される確率の順位を記憶している。選択部115は、
予測器順位記憶部114で記憶されている順に、第1予
測器106〜第N予測器108の予測結果110〜11
2と、符号化画素の画素値104の比較を行う。
The predictor rank storage unit 114 stores the rank of the probability that a predictor is selected. The selection unit 115
The prediction results 110 to 11 of the first predictor 106 to the N-th predictor 108 are stored in the order stored in the predictor rank storage unit 114.
2 is compared with the pixel value 104 of the coded pixel.

【0095】選択部115は、予測器の順位の順に比較
を行い、予測結果と符号化画素の画素値104が同じで
あれば、その予測器の順位を符号化部116で符号化す
る。また、全ての予測結果110〜112と、符号化画
素の画素値104が異なっている場合、選択部115
は、予測誤差を符号化することを選択し、符号化部11
6は予測誤差を符号化する。符号化部の動作の詳細は後
述する。
The selecting unit 115 compares the order of the predictors, and if the prediction result is the same as the pixel value 104 of the coded pixel, the coding unit 116 codes the order of the predictor. When all the prediction results 110 to 112 are different from the pixel value 104 of the coded pixel, the selection unit 115
Selects to encode the prediction error, and the encoding unit 11
6 encodes the prediction error. Details of the operation of the encoding unit will be described later.

【0096】さらに、予測器順位変更部118は、選択
部115で選択された予測器の順位を1位として予測器
順位記憶部114の予測器順位を変更する。予測器順位
変更部118は、同時に選択部115で選択されない全
ての予測器の予測器順位を1下げる。ここで1下げると
は、M位の予測器が、(M+1)位の予測器になること
である。また、ここでの予測器は予測誤差算出器も含
む。予測誤差となる場合は、通常の予測器が選択された
場合と統計的性質が大きく異なることが予測されるの
で、予測誤差の順位のみ固定しても良い。
Further, the predictor rank changing unit 118 changes the predictor rank in the predictor rank storage unit 114 with the rank of the predictor selected by the selection unit 115 as the first place. The predictor rank changing unit 118 lowers the predictor ranks of all the predictors not selected by the selection unit 115 at the same time. Here, lowering by 1 means that the M-th predictor becomes the (M + 1) -th predictor. The predictor here also includes a prediction error calculator. In the case of a prediction error, it is predicted that the statistical properties are significantly different from the case where a normal predictor is selected. Therefore, only the rank of the prediction error may be fixed.

【0097】つぎに、画素抽出部103の動作を詳細に
説明する。図2は画素抽出部103を説明するものであ
り、図2に示されるように、画素抽出部103は入力画
像を矩形領域(ブロック)に分割する。例えば、図2の
ように8×8画素のブロックに分割する。
Next, the operation of the pixel extracting unit 103 will be described in detail. FIG. 2 illustrates the pixel extraction unit 103. As shown in FIG. 2, the pixel extraction unit 103 divides an input image into rectangular regions (blocks). For example, as shown in FIG. 2, the image is divided into 8 × 8 pixel blocks.

【0098】さらに図3を用いて画素抽出部103の動
作を説明する。画素抽出部103は図3に示されるよう
に、第1段階として、ブロックの右下の画素を符号化画
素として抽出する。第2段階として、ブロックを縦横均
等に4分割し、その分割されたブロック(サブブロッ
ク)の右下の画素を抽出する。同様に第3段階として、
さらにサブブロックを4分割し、右下の画素を抽出す
る。8×8のブロックでは、第4段階まで行うと、全て
の画素を抽出できる。
The operation of the pixel extracting unit 103 will be described with reference to FIG. As shown in FIG. 3, as a first stage, the pixel extraction unit 103 extracts the lower right pixel of the block as a coded pixel. As a second stage, the block is divided into four equal parts vertically and horizontally, and the lower right pixel of the divided block (sub-block) is extracted. Similarly, as a third step,
Further, the sub-block is divided into four, and the lower right pixel is extracted. In an 8 × 8 block, all the pixels can be extracted by performing the steps up to the fourth stage.

【0099】一つのサブブロック内の次に符号化を行う
段階の符号化画素はこの例では3つある。以下の説明の
ために3つの画素の位置によって、画素の相対位置の位
相番号を図3のように付けておく。また、第1段階の画
素(右下の画素)のみは、他の段階の画素とは性質が異
なるため、右下の画素を第1段階の画素として、以下、
別に取り扱う。同一段階にある(同じ大きさの)サブブ
ロックは、ラスタスキャン順に、左上から右に符号化
し、一番右を符号化し終わったら、一段下のサブブロッ
クを符号化する。参照画素は、既に符号化された画素で
ある。ここで、位相1、2、3の順に符号化を行うとす
ると、図4に示されるように、最も隣接した既に符号化
された画素を参照画素として抽出する。
In this example, there are three coded pixels in the stage of performing the next coding in one sub-block. For the following description, the phase numbers of the relative positions of the pixels are given as shown in FIG. 3 according to the positions of the three pixels. Further, only the pixel at the first stage (lower right pixel) has a different property from the pixels at the other stages.
Treat separately. Sub-blocks at the same stage (of the same size) are coded from the upper left to the right in the raster scan order, and when the right-most block is coded, the sub-block at the next lower stage is coded. The reference pixel is a pixel that has already been encoded. Here, assuming that encoding is performed in the order of phases 1, 2, and 3, as shown in FIG. 4, the most adjacent already encoded pixel is extracted as a reference pixel.

【0100】次に予測器(106〜108)について説
明する。図5に示されるように、位相1の場合の参照画
素は、例えば、D,I,Gとすることができる。予測器
として、次の方法を用いる。 Dの画素値をそのまま予測結果とする。 Iの画素値をそのまま予測結果とする。 Gの画素値をそのまま予測結果とする。 (D+I)/2 の計算結果を予測結果とする。
Next, the predictors (106 to 108) will be described. As shown in FIG. 5, the reference pixels in the case of phase 1 can be, for example, D, I, and G. The following method is used as a predictor. The pixel value of D is directly used as the prediction result. The pixel value of I is directly used as the prediction result. The pixel value of G is directly used as the prediction result. The calculation result of (D + I) / 2 is set as a prediction result.

【0101】同様に、位相2の場合の参照画素は、例え
ば、H,I,Cとすることができる。予測器として、次
の方法を用いる。 Hの画素値をそのまま予測結果とする。 Iの画素値をそのまま予測結果とする。 Cの画素値をそのまま予測結果とする。 (H+I)/2 の計算結果を予測結果とする。
Similarly, the reference pixels in the case of phase 2 can be, for example, H, I, and C. The following method is used as a predictor. The pixel value of H is directly used as the prediction result. The pixel value of I is directly used as the prediction result. The pixel value of C is directly used as the prediction result. The calculation result of (H + I) / 2 is set as a prediction result.

【0102】同様に、位相3の場合の参照画素は、例え
ば、C,G,J,Kとすることができる。予測器とし
て、次の方法を用いる。 Cの画素値をそのまま予測結果とする。 Gの画素値をそのまま予測結果とする。 Jの画素値をそのまま予測結果とする。 Kの画素値をそのまま予測結果とする。 (C+G+J+K)/4 の計算結果を予測結果とす
る。
Similarly, the reference pixels in the case of phase 3 can be, for example, C, G, J, and K. The following method is used as a predictor. The pixel value of C is directly used as the prediction result. The pixel value of G is directly used as the prediction result. The pixel value of J is directly used as the prediction result. The pixel value of K is directly used as the prediction result. The calculation result of (C + G + J + K) / 4 is set as the prediction result.

【0103】第1段階の場合は、D,Hを参照画素とす
ることができる。予測器として次の方法を用いる。 Dの画素値をそのまま予測結果とする。 Hの画素値をそのまま予測結果とする。 (D+H)/2 の計算結果を予測結果とする。
In the case of the first stage, D and H can be used as reference pixels. The following method is used as a predictor. The pixel value of D is directly used as the prediction result. The pixel value of H is directly used as the prediction result. The calculation result of (D + H) / 2 is set as a prediction result.

【0104】参照画素や予測器は以上に限ったものでは
なく、既に符号化された画素であれば何でも使用でき
る。また、予測器の数の制限もない。また、以上のよう
に、画素の位相に応じて参照画素の位置および数は変化
する。
The reference pixel and the predictor are not limited to the above, and any pixel that has already been encoded can be used. Also, there is no limit on the number of predictors. Further, as described above, the position and the number of reference pixels change according to the phase of the pixel.

【0105】予測誤差算出器109は例えば、以下の計
算を行う回路を用いる。 位相1の場合、(D+I)/2 位相2の場合、(H+I)/2 位相3の場合、(C+G+J+K)/4 第1段階の場合、(D+H)/2 当然ながら、予測誤差算出器109は他の参照画素を用
いる回路としても良い。例えば、位相1の場合、 (B+H)/2 等を用いても良い。
As the prediction error calculator 109, for example, a circuit for performing the following calculation is used. In the case of phase 1, (D + I) / 2 In the case of phase 2, (H + I) / 2 In the case of phase 3, (C + G + J + K) / 4 In the case of the first stage, (D + H) / 2 A circuit using another reference pixel may be used. For example, in the case of phase 1, (B + H) / 2 may be used.

【0106】次に符号化部116の動作を詳細に説明す
る。符号化部116へは、選択部115で選択された予
測器順位と予測誤差がある場合は予測誤差が送られる。
1ブロック内の符号情報は、図6(b)に示されるよう
に、1ブロック分の1位以外の順位符号と、1ブロック
分の予測誤差符号と、1位か1位以外かを示す的中情報
の3つに分けることができる。例えば、図6(b)では
的中した場合の的中情報を1、的中していない場合を0
としている。符号化部116はこれら3つの情報を符号
化し、1ブロックの符号とする。
Next, the operation of encoding section 116 will be described in detail. If there is a predictor rank and a prediction error selected by the selection unit 115, the prediction error is sent to the encoding unit 116.
As shown in FIG. 6B, the code information in one block includes a rank code other than the first place for one block, a prediction error code for one block, and a target indicating whether it is the first place or other than the first place. The information can be divided into three types. For example, in FIG. 6B, the hit information when hit is 1 and the hit information when hit is not 0 is shown in FIG.
And The encoding unit 116 encodes these three pieces of information to make a one-block code.

【0107】例えば、予測器がM個ある場合、順位符号
は2位からM位までの順位に対してその生起確率に応じ
たハフマン符号を図7のように割当てることができる。
各順位に対しハフマン符号化を行う。また、同様に予測
誤差に対してもその生起確率に応じた符号を割当てて符
号化する。
For example, when there are M predictors, Huffman codes corresponding to the occurrence probabilities can be assigned to the rank codes from the second rank to the M rank as shown in FIG.
Huffman coding is performed for each rank. Similarly, a code corresponding to the occurrence probability is assigned to the prediction error and encoded.

【0108】的中情報は、1ビットの情報であるため、
従来の2値用の符号化方法を利用することができる。例
えば、MH、MR、MMR、QM符号化等である。ある
いは、的中情報を数ビット(例えば8ビット)づつまと
めてハフマン符号化しても良い。
Since the hit information is 1-bit information,
A conventional binary encoding method can be used. For example, MH, MR, MMR, QM coding, and the like. Alternatively, the hit information may be Huffman-encoded collectively by several bits (for example, 8 bits).

【0109】[実施例2]つぎに本発明の実施例2につ
いて説明する。この実施例2は、さらに符号化効率を高
めるため、画素位相、符号化の段階毎に異なる予測器順
位を用いるものである。全体の構成は実施例1と同様で
あるので図1を適宜参照されたい。
Embodiment 2 Next, Embodiment 2 of the present invention will be described. In the second embodiment, in order to further enhance the coding efficiency, different predictor ranks are used for each pixel phase and each coding stage. Since the entire configuration is the same as that of the first embodiment, please refer to FIG.

【0110】図8に示されるように、予測器順位記憶部
114は、第1段階の符号化画素と、第2段階(画素位
相1)、第2段階(画素位相1)、...、第4段階
(画素位相3)まで、全ての段階と、画素位相に対し
て、異なる予測器順位を記憶する。
As shown in FIG. 8, the predictor rank storage unit 114 stores encoded pixels in the first stage, the second stage (pixel phase 1), the second stage (pixel phase 1),. . . , Different predictor ranks are stored for all stages and pixel phases up to the fourth stage (pixel phase 3).

【0111】予測器順位変更部118も、符号化画素の
段階と位相に応じて順位を変更する。
The predictor rank changing unit 118 also changes the rank according to the stage and phase of the coded pixel.

【0112】符号化画素と参照画素の位置が近い場合に
は予測が的中しやすく、遠い場合には予測が的中しにく
い。すなわち、符号化画素の段階と位相によって、各順
位の予測器の的中確率も異なると考えられる。異なる的
中確率の事象に対してはそれに最適な異なる符号を割当
てることによりさらに効率的な符号化が可能となる。
When the position of the coded pixel and the reference pixel is close, the prediction is likely to be correct, and when the position is far, the prediction is hard to be correct. That is, it is considered that the hit probability of the predictor of each rank differs depending on the stage and phase of the coded pixel. More efficient encoding is possible for events with different hit probabilities by assigning different codes that are optimal to them.

【0113】この実施例2によれば、さらに効率的な符
号化が可能となる。
According to the second embodiment, more efficient encoding can be performed.

【0114】[実施例3]つぎに本発明の実施例3につ
いて説明する。この実施例3は、画素抽出部103の抽
出順序に工夫を加えたものである。以下、図9を参照し
て説明する。図9の(a)に示されるように、サブブロ
ックの位相を定める。外枠がサブブロックに分割前のブ
ロックあるいはサブブロックであり、それを4等分した
時のサブブロックは図9の(a)のように番号をふる。
そして以下の順で画素抽出部103では画素を抽出す
る。
Third Embodiment Next, a third embodiment of the present invention will be described. In the third embodiment, the extraction order of the pixel extraction unit 103 is modified. Hereinafter, description will be made with reference to FIG. As shown in FIG. 9A, the phase of the sub-block is determined. The outer frame is a block or sub-block before being divided into sub-blocks, and the sub-blocks obtained by dividing the block into four are numbered as shown in FIG.
Then, the pixel extraction unit 103 extracts pixels in the following order.

【0115】まず第1に、第1段階の画素すなわち、ブ
ロックの右下の画素を抽出する。次に第2段階の画素を
抽出する。次に、ブロックをサブブロックに分割し、サ
ブブロック位相が0、1、2、3の順で抽出する。サブ
ブロック内全ての画素を抽出してから、次のサブブロッ
ク位相の画素を抽出する。常にサブブロック位相は0、
1、2、3の順で抽出する。画素位相は1、2、3の順
で抽出する。
First, pixels at the first stage, that is, pixels at the lower right of the block are extracted. Next, the pixels of the second stage are extracted. Next, the block is divided into sub-blocks, and sub-block phases are extracted in the order of 0, 1, 2, and 3. After extracting all the pixels in the sub-block, the pixel of the next sub-block phase is extracted. Subblock phase is always 0,
Extract in the order of 1, 2, 3. Pixel phases are extracted in the order of 1, 2, and 3.

【0116】結果として、8×8画素のブロックの場
合、図9の(b)に示される順序で抽出が行われる。
As a result, in the case of an 8 × 8 pixel block, extraction is performed in the order shown in FIG. 9B.

【0117】この形態の場合、上と左のサブブロックの
画素は常に全て符号化済であるため、第1の形態の場合
は、図9の(c1)に示されるような歯抜けの参照画素
しかとれなかったが、図9の(c2)に示されるよう
に、密集した参照画素とすることができる。結果とし
て、参照画素が増えるため、予測的中率が向上し、符号
化効率が良くなる。
In this embodiment, since the pixels of the upper and left sub-blocks are all already coded, in the case of the first embodiment, the missing reference pixel as shown in (c1) of FIG. However, as shown in (c2) of FIG. 9, dense reference pixels can be obtained. As a result, since the number of reference pixels increases, the predictive accuracy is improved, and the coding efficiency is improved.

【0118】[実施例4]つぎに、本発明の実施例4に
ついて説明する。この実施例4は、予測器順位変更部1
18の動作の一例を示すものである。
Embodiment 4 Next, Embodiment 4 of the present invention will be described. In the fourth embodiment, the predictor rank changing unit 1
18 shows an example of the operation of FIG.

【0119】実施例1においては、直前に選択された予
測器を1位としたが、本実施例では、過去の選択された
予測器の頻度をとっておき、その頻度情報を基に予測器
順位を決定する。例えば、1ブロック内で、各予測器の
的中回数を計測しておく。的中回数の多い順に次のブロ
ックの予測順位を定める。これは1ブロック毎ではなく
て、所定の符号化画素数毎でも、もちろん良い。
In the first embodiment, the predictor selected immediately before is ranked first. In the present embodiment, the frequency of the past selected predictor is set, and the predictor rank is determined based on the frequency information. decide. For example, the number of hits of each predictor is measured in one block. The prediction order of the next block is determined in descending order of the number of hits. This is of course good not only for each block but also for each predetermined number of encoded pixels.

【0120】[実施例5]つぎに本発明の実施例5につ
いて説明する。この実施例5は、画像の描画方向や、同
一画素の塊がある場合に予測効率を高めることのできる
予測器を提供するものである。
[Fifth Embodiment] Next, a fifth embodiment of the present invention will be described. The fifth embodiment provides a predictor that can increase the prediction efficiency when the drawing direction of an image or a cluster of identical pixels is present.

【0121】本実施例においては、次の予測器を第1の
予測器にさらに追加する。画素位相1で、図10のよう
に画素に名前をつける。予測結果をXとする。
In this embodiment, the next predictor is further added to the first predictor. At the pixel phase 1, the pixels are named as shown in FIG. Let X be the prediction result.

【0122】図10において、B=G=HかつD=Iで
あれば、この画像は縦線で構成されていると予測できる
ため、X=Iと予測する。すなわち B=G=HかつD=IかつD=I → X=I 同様に、 C=G かつD=H かつF=I → X=E A=G かつB=I → X=C D=G=I → X=I G=H=I → X=I C=D=G → X=D C=D=I → X=I と予測する。
In FIG. 10, if B = G = H and D = I, it can be predicted that this image is composed of vertical lines, so that X = I is predicted. B = G = H and D = I and D = I → X = I Similarly, C = G and D = H and F = I → X = EA A = G and B = I → X = CD D = G = I → X = I G = H = I → X = I C = D = G → X = D C = D = I → X = I

【0123】同様に、画素位相2の場合は、図11より B=G=HかつD=J=I → X=C B=C=DかつG=JかつH=I → X=I C=GかつD=HかつE=J → X=J A=GかつB=IかつC=J → X=G H=I=J → X=H G=H=I → X=G C=H=I → X=C 同様に画素位相3の場合は、図12より B=G=HかつD=J=IかつC=K → X=C B=C=DかつG=JかつH=k=I → X=J C=GかつD=HかつK=J → X=D K=GかつB=IかつC=J → X=B K=I=J → X=K G=H=K → X=K B=C=G → X=B C=D=J → X=C と予測する。Similarly, in the case of the pixel phase 2, from FIG. 11, B = G = H and D = J = I → X = CB B = C = D and G = J and H = I → X = IC = G and D = H and E = J → X = J A = G and B = I and C = J → X = GH = I = J → X = HG G = H = I → X = GC = H = I → X = C Similarly, in the case of pixel phase 3, B = G = H and D = J = I and C = K → X = CB B = C = D and G = J and H = k = I → X = J C = G and D = H and K = J → X = DK = G and B = I and C = J → X = BK = I = J → X = KG = H = K → It is predicted that X = KB = C = G → X = BC = D = J → X = C.

【0124】[実施例6]実施例6は、符号化部116
の構成とした他の構成を用いたものである。実施例1の
符号化部116は、順位情報と、的中情報を別に符号化
したが、本形態ではランレングスを用いて同時に符号化
する。
[Embodiment 6] In Embodiment 6, the encoding unit 116
In this case, another configuration is used. The encoding unit 116 of the first embodiment separately encodes the rank information and the hit information, but in the present embodiment, encodes them simultaneously using run length.

【0125】図6の(a)を用いて説明を行う。図6の
(a)において、選択部115からは、予測順位と、予
測誤差が符号化の順に送られて来る。符号化部116は
予測誤差の場合は予測誤差を予測誤差用のハフマンテー
ブルを用いて符号化し、バッファに蓄積する。
Description will be made with reference to FIG. In FIG. 6A, the prediction order and the prediction error are sent from the selection unit 115 in the order of encoding. In the case of a prediction error, the encoding unit 116 encodes the prediction error using a Huffman table for the prediction error, and accumulates the prediction error in a buffer.

【0126】予測順位の符号化は、次のように行う。 1位以外の場合、順位符号用のハフマンテーブルを用
いて符号化し、バッファに蓄積する。 1位の場合、ラン識別符号を付加し、1位の順位が連
続した数(ラン長)を符号化する。 ブロックの最後までランが続く場合は、ラン長を符号化
せず、ブロックの最後を示すEOB符号を付加する。
The encoding of the prediction order is performed as follows. If it is not the first place, it is encoded using the Huffman table for the rank code and stored in the buffer. In the case of the first place, a run identification code is added, and the number (run length) in which the first place is continuous is encoded. If the run continues to the end of the block, the run length is not coded and an EOB code indicating the end of the block is added.

【0127】以上により、図6(a)に示されるよう
な、1ブロック分の符号が作成される。
As described above, a code for one block is created as shown in FIG.

【0128】[実施例7]本発明の実施例7は、参照画
素を用いてマルコフモデルによる予測器順位の順位付け
を行い、符号化効率を高めるものである。以下図13を
用いて説明する。図13において、同じ番号は図1と同
じ構成を示している。図13において、1401はパタ
ーン決定部、1402は決定パターン番号である。パタ
ーン決定部1401は、参照画素の状態をパターン番号
1402として予測器順位変更部118と、予測器順位
記憶部114に送る。予測器順位記憶部114では、図
14に示されるようにパターン毎に異なる順位を持って
おり、選択部115はここから得られた順位を符号化部
116に送る。予測器順位変更部は、送られたパターン
番号1402に対応する順位の変更を行う。
[Embodiment 7] Embodiment 7 of the present invention is to improve the coding efficiency by ranking the predictor ranks by a Markov model using reference pixels. This will be described below with reference to FIG. In FIG. 13, the same numbers indicate the same configurations as in FIG. In FIG. 13, reference numeral 1401 denotes a pattern determining unit, and 1402 denotes a determined pattern number. The pattern determination unit 1401 sends the state of the reference pixel as the pattern number 1402 to the predictor rank change unit 118 and the predictor rank storage unit 114. The predictor rank storage unit 114 has different ranks for each pattern as shown in FIG. 14, and the selection unit 115 sends the obtained rank to the encoding unit 116. The predictor rank changing unit changes the rank corresponding to the transmitted pattern number 1402.

【0129】パターン番号は、以下のように同一画素位
置で決定する。ここで図5の参照画素の符号を参照す
る。
The pattern number is determined at the same pixel position as follows. Here, reference is made to the reference numeral of the reference pixel in FIG.

【0130】画素位相1の場合、以下を上から順に調べ
て当てはまった所でパターン番号を決定する。 C=GかつD=HかつF=I → パターン1 B=G=HかつD=I → パターン2 A=GかつB=I → パターン3 D=G=I → パターン4 G=H=I → パターン5 C=D=G → パターン6 C=D=I → パターン7 その他 → パターン8 と決定する。
In the case of the pixel phase 1, the followings are examined in order from the top, and a pattern number is determined where the above applies. C = G and D = H and F = I → pattern 1 B = G = H and D = I → pattern 2 A = G and B = I → pattern 3 D = G = I → pattern 4 G = H = I → Pattern 5 C = D = G → pattern 6 C = D = I → pattern 7 others → pattern 8

【0131】同様に、画素位相2の場合は、 B=G=HかつD=J=I → パターン1 B=C=DかつG=JかつH=I → パターン2 C=GかつD=HかつE=J → パターン3 A=GかつB=IかつC=J → パターン4 H=I=J → パターン5 G=H=I → パターン6 C=H=I → パターン7 その他 → パターン8 同様に画素位相3の場合は、 B=G=HかつD=J=IかつC=K → パター
ン1 B=C=DかつG=JかつH=k=I → パター
ン2 C=GかつD=HかつK=J → パターン3 K=GかつB=IかつC=J → パターン4 K=I=J → パターン5 G=H=K → パターン6 B=C=G → パターン7 C=D=J → パターン8 その他 → パターン9 同様に第1段階の時、 B=D → パターン1 B=H → パターン2 その他 → パターン3 以上のようにして符号化が行われる。
Similarly, in the case of pixel phase 2, B = G = H and D = J = I → pattern 1 B = C = D and G = J and H = I → pattern 2 C = G and D = H And E = J → Pattern 3 A = G and B = I and C = J → Pattern 4 H = I = J → Pattern 5 G = H = I → Pattern 6 C = H = I → Pattern 7 Other → Same as Pattern 8 In the case of pixel phase 3, B = G = H and D = J = I and C = K → pattern 1 B = C = D and G = J and H = k = I → pattern 2 C = G and D = H and K = J → Pattern 3 K = G and B = I and C = J → Pattern 4 K = I = J → Pattern 5 G = H = K → Pattern 6 B = C = G → Pattern 7 C = D = J → Pattern 8 Other → Pattern 9 Similarly, at the first stage, B = D → Pattern 1 B = H → P Coding is performed in the over down 2 Other → pattern 3 above.

【0132】[実施例8]つぎに本発明の実施例8につ
いて説明する。実施例8は、先の実施例7の形態に加え
て、次の方法によりパターンを決定する。
[Eighth Embodiment] Next, an eighth embodiment of the present invention will be described. In the eighth embodiment, in addition to the configuration of the seventh embodiment, the pattern is determined by the following method.

【0133】図5の画素位置の符号を用いる。サブブロ
ックの濃度の傾きを平面で近似して、その平面の傾きの
方向でパターン分類する。ここで絶対値を表す関数をa
bs()とする。また閾値Tを定めておく。 abs(B−H)≦Tかつabs(D−I)≦Tのと
きU=1 B−H<−TかつD−I<TのときU=2 B−H>TかつD−I>TのときU=3 その他の時U=0 同様に、 abs(B−D)≦Tかつabs(H−I)≦Tのと
きV=1 B−D<−TかつH−I<TのときV=2 B−D>TかつH−I>TのときV=3 その他の時V=0 UとVの積を作って、0から9までの10種類のパター
ンを決定できる。あるいは、UとVの組合せで16種類
のパターンを決定できる。
The reference numerals of the pixel positions in FIG. 5 are used. The gradient of the density of the sub-block is approximated by a plane, and pattern classification is performed in the direction of the gradient of the plane. Here, the function representing the absolute value is a
bs (). In addition, a threshold value T is determined. U = 1 when abs (BH) ≤T and abs (DI) ≤T U = 2 when BH <-T and DI <T U = 2 BH> T and DI> T If U = 3, otherwise U = 0 Similarly, if abs (BD) ≤T and abs (HI) ≤T, then V = 1 if BD-T and HI <T V = 2 When V−D> T and H−I> T, V = 3. In other cases, V = 0. The product of U and V can be formed to determine ten types of patterns from 0 to 9. Alternatively, 16 types of patterns can be determined by a combination of U and V.

【0134】[実施例9]つぎに本発明の実施例9につ
いて説明する。この実施例9は、各予測結果と、符号化
画素の画素値が異なる場合でも、予測が的中したと見な
して符号化し、画質と符号量のトレードオフを可能にす
るものである。
Embodiment 9 Next, Embodiment 9 of the present invention will be described. In the ninth embodiment, even when each prediction result is different from the pixel value of the coded pixel, coding is performed by regarding that the prediction has been successful, thereby enabling a trade-off between the image quality and the code amount.

【0135】図15を用いて説明を行う。図15と図1
の同一の符号は同一の構成要素を表している。図15の
構成は、図1に加えて、復号画像算出部1502を設け
ている。
Description will be made with reference to FIG. FIG. 15 and FIG.
The same reference numerals indicate the same components. The configuration in FIG. 15 includes a decoded image calculation unit 1502 in addition to the configuration in FIG.

【0136】次に動作を説明する。実施例1と異なる部
分のみを説明する。予測誤差算出器109では、予測誤
差を算出し、算出された予測誤差を各符号化の段階と画
素位相に応じて指定された量子化ステップで割って、そ
の商を量子化誤差113として選択部115に送る。
Next, the operation will be described. Only parts different from the first embodiment will be described. The prediction error calculator 109 calculates a prediction error, divides the calculated prediction error by a quantization step designated according to each encoding stage and a pixel phase, and divides the quotient as a quantization error 113 by the selection unit. Send to 115.

【0137】選択部115は、予測器の順位の順に比較
を行い、予測結果と符号化画素の画素値104との差分
の絶対値が所定の閾値に等しいか、小さければ、その予
測器の順位を符号化部116で符号化する。また、全て
の予測結果110〜112と、符号化画素の画素値10
4が異なっている場合、選択部115は、予測誤差を符
号化することを選択し、符号化部116は予測誤差を符
号化する。
The selecting section 115 performs a comparison in the order of the order of the predictors. If the absolute value of the difference between the prediction result and the pixel value 104 of the coded pixel is equal to or smaller than a predetermined threshold value, the order of the predictor is determined. Is encoded by the encoding unit 116. Further, all the prediction results 110 to 112 and the pixel value 10
When 4 is different, the selection unit 115 selects to encode the prediction error, and the encoding unit 116 encodes the prediction error.

【0138】復号画像算出部1502は、選択された予
測器が誤差を持つ予測器である場合および、量子化され
た予測誤差が選択された場合、復号画像を算出して、画
像記憶部102に送る。
When the selected predictor is a predictor having an error and when the quantized prediction error is selected, the decoded image calculating section 1502 calculates a decoded image and sends it to the image storage section 102. send.

【0139】画像記憶部102は、復号画像算出部15
02によって算出された復号画像で、既に記憶されてい
る入力画像の画素値を書き換えるか、または、復号画像
専用の領域に復号画像を記憶する。
The image storage unit 102 stores the decoded image
The pixel value of the input image already stored is rewritten with the decoded image calculated in step 02, or the decoded image is stored in an area dedicated to the decoded image.

【0140】予測器106〜109は、復号画像算出部
1502で算出された復号画像の画素値を用いて予測を
行う。所定の閾値は、各符号化の段階と画素位相で異な
っていても良い。
The predictors 106 to 109 perform prediction using the pixel values of the decoded image calculated by the decoded image calculation unit 1502. The predetermined threshold may be different for each encoding stage and pixel phase.

【0141】復号時は、量子化ステップのみを知ってい
れば良いので、量子化ステップは予め、符号化側と復号
側で決めておくか、符号のヘッダとして加える。
At the time of decoding, since only the quantization step needs to be known, the quantization step is determined in advance by the encoding side and the decoding side, or is added as a code header.

【0142】また、本実施例においては、量子化ステッ
プを1とすること、また、選択部115における閾値を
0とすることにより、符号化ハードウエアを変更するこ
となく容易に可逆符号化を実現できる。
In this embodiment, by setting the quantization step to 1 and setting the threshold value in the selection unit 115 to 0, lossless encoding can be easily realized without changing the encoding hardware. it can.

【0143】[実施例10]つぎに本発明の実施例10
について説明する。実施例10は実施例9の形態におい
て、さらに、例えば、第1段階の画素の場合には誤差を
許容しないことによって、誤差の伝搬を押さえて良好な
画質を得ることができるようにしたものである。
[Embodiment 10] Next, Embodiment 10 of the present invention will be described.
Will be described. The tenth embodiment is different from the ninth embodiment in that, for example, by not allowing an error in the case of the first stage pixel, it is possible to suppress the propagation of the error and obtain a good image quality. is there.

【0144】[実施例11]つぎに本発明の実施例11
について説明する。実施例9においては、選択部115
は、予測器の順位の順に比較を行ったが、実施例11に
おいては、最初に比較を行う予測器を定めておく。例え
ば、非可逆に都合の良い予測器で最初に比較をすること
によって、その予測器の的中確率が高くなり、符号化効
率を高めることができる。
[Eleventh Embodiment] Next, an eleventh embodiment of the present invention will be described.
Will be described. In the ninth embodiment, the selection unit 115
Are compared in the order of the predictors, but in the eleventh embodiment, the predictor to be compared first is determined. For example, by performing a comparison first with an irreversibly convenient predictor, the hit probability of the predictor is increased, and coding efficiency can be increased.

【0145】以下、図5の符号を用いる。例えば、画素
位相1では、(D+I)/2を最初の予測器として用い
る。画素位相2では、(H+I)/2を最初の予測器と
して用いる。画素位相3では、(C+G+J+K)/4
を最初の予測器として用いる。
Hereinafter, reference numerals in FIG. 5 are used. For example, at pixel phase 1, (D + I) / 2 is used as the first predictor. At pixel phase 2, (H + I) / 2 is used as the first predictor. At pixel phase 3, (C + G + J + K) / 4
Is used as the first predictor.

【0146】第1段階では、(D+H)/2を最初の予
測器として用いる。
In the first stage, (D + H) / 2 is used as the first predictor.

【0147】[実施例12]つぎに本発明の実施例12
について説明する。実施例12においては、予測器によ
って、予測器を選択するかどうかの閾値を変える。可逆
に適した予測器、すなわち、画素値をそのまま用いる予
測器の場合には、誤差を許容しない符号化を行う。ま
た、非可逆に適した予測器、すなわち、参照画素の線形
和で予測する予測器の場合には、誤差を許容する符号化
を行う。
[Twelfth Embodiment] Next, a twelfth embodiment of the present invention will be described.
Will be described. In the twelfth embodiment, the threshold value for selecting a predictor is changed depending on the predictor. In the case of a predictor suitable for reversibility, that is, a predictor that uses a pixel value as it is, encoding that does not allow an error is performed. In the case of a predictor suitable for irreversibility, that is, a predictor that predicts with a linear sum of reference pixels, encoding that allows an error is performed.

【0148】例えば、画素位相1の場合には、 Dの画素値をそのまま予測結果とする予測器:閾値=
0 Iの画素値をそのまま予測結果とする予測器:閾値=
0 Gの画素値をそのまま予測結果とする予測器:閾値=
0 (D+I)/2の計算結果を予測結果とする予測器:
閾値>0 同様に、位相2の場合は、 Hの画素値をそのまま予測結果とする予測器:閾値=
0 Iの画素値をそのまま予測結果とする予測器:閾値=
0 Cの画素値をそのまま予測結果とする予測器:閾値=
0 (H+I)/2の計算結果を予測結果とする予測器:
閾値>0 同様に、位相3の場合は、 Cの画素値をそのまま予測結果とする予測器:閾値=
0 Gの画素値をそのまま予測結果とする予測器:閾値=
0 Jの画素値をそのまま予測結果とする予測器:閾値=
0 Kの画素値をそのまま予測結果とする予測器:閾値=
0 (C+G+J+K)/4の計算結果を予測結果とする
予測器:閾値>0 第1段階の場合は、 Dの画素値をそのまま予測結果とする予測器:閾値=
0 Hの画素値をそのまま予測結果とする予測器:閾値=
0 (D+H)/2の計算結果を予測結果とする予測器:
閾値>0 とする。
For example, in the case of a pixel phase 1, a predictor that uses the pixel value of D as a prediction result as it is: threshold =
A predictor that uses the pixel value of 0 I as a prediction result: threshold =
A predictor that uses 0 G pixel values as prediction results as they are: threshold =
A predictor that uses a calculation result of 0 (D + I) / 2 as a prediction result:
Threshold> 0 Similarly, in the case of phase 2, a predictor that uses the pixel value of H as a prediction result as is: threshold =
A predictor that uses the pixel value of 0 I as a prediction result: threshold =
A predictor that uses a pixel value of 0 C as a prediction result as is: threshold =
A predictor that uses a calculation result of 0 (H + I) / 2 as a prediction result:
Threshold> 0 Similarly, in the case of phase 3, a predictor that uses the pixel value of C as a prediction result as is: threshold =
A predictor that uses 0 G pixel values as prediction results as they are: threshold =
A predictor that uses a pixel value of 0 J as a prediction result as is: threshold =
A predictor that uses a pixel value of 0K as a prediction result as it is: threshold =
0 A predictor that uses a calculation result of (C + G + J + K) / 4 as a prediction result: threshold> 0 In the first stage, a predictor that uses the pixel value of D as a prediction result: threshold =
A predictor that uses the pixel value of 0 H as a prediction result as it is: threshold =
A predictor that uses a calculation result of 0 (D + H) / 2 as a prediction result:
Threshold> 0.

【0149】[実施例13]つぎに本発明の実施例13
について説明する。以上の非可逆を実現する実施例9〜
12の場合、非可逆化によって、通常の量子化等で見ら
れるような疑似輪郭が発生する場合がある。この実施例
13は疑似輪郭の発生を防ぎ、かつ視覚的に良好な画質
を得るために、周囲の参照画素の誤差を符号化画素に加
えて全体の誤差量を少なくするものである。
[Thirteenth Embodiment] Next, a thirteenth embodiment of the present invention will be described.
Will be described. Ninth Embodiment Realizing the Above-Reversibility
In the case of 12, the irreversibility may cause a pseudo contour as seen in normal quantization or the like. In the thirteenth embodiment, in order to prevent the occurrence of a false contour and to obtain a visually favorable image quality, the error of the surrounding reference pixels is added to the coded pixels to reduce the total error amount.

【0150】図16を用いて説明を行う。図16と図1
5の同一の符号は同一の構成要素を表している。図16
においては、図15の構成に加えて、画素誤差拡散部1
501が設けられている。
Description will be made with reference to FIG. FIG. 16 and FIG.
5, the same reference numerals represent the same components. FIG.
In addition, in addition to the configuration of FIG.
501 is provided.

【0151】次に動作を説明する。実施例9と異なる部
分のみを説明する。図16において、選択部115およ
び予測誤差算出器109において誤差が発生する。画素
誤差拡散部1501では、参照画素の誤差の線形和を計
算し、それを符号化画素に加算することによって、全体
の符号化誤差を小さくするように、符号化画素の画素値
を補正する。以降、補正した符号化画素の画素値を入力
画素値と見なして符号化を行う。
Next, the operation will be described. Only parts different from the ninth embodiment will be described. In FIG. 16, an error occurs in the selection unit 115 and the prediction error calculator 109. The pixel error diffusion unit 1501 calculates the linear sum of the error of the reference pixel and adds it to the coded pixel, thereby correcting the pixel value of the coded pixel so as to reduce the entire coding error. Thereafter, encoding is performed by regarding the pixel value of the corrected encoded pixel as an input pixel value.

【0152】図5の画素名を用いる。また、符号化画素
の画素値をX、補正後の画素値をX’とする。参照画素
は、入力画像の画素値をA、符号化後の復号画像の画素
値をA’とする。(B〜Kも同様) 画素位相1の場合、 X’=X+(D−D’)/2+(I−I’)/2 とする。
The pixel names shown in FIG. 5 are used. Also, let the pixel value of the encoded pixel be X and the corrected pixel value be X '. As the reference pixel, the pixel value of the input image is A, and the pixel value of the decoded image after encoding is A '. (Same for B to K) In the case of pixel phase 1, X ′ = X + (D−D ′) / 2+ (I−I ′) / 2.

【0153】同様に画素位相2の場合、 X’=X+(H−H’)/2+(I−I’)/2 とする。Similarly, in the case of the pixel phase 2, it is assumed that X ′ = X + (H−H ′) / 2+ (I−I ′) / 2.

【0154】同様に画素位相3の場合、 X’=X+(C−C’)/4+(G−G’)/4+(K
−K’)/4+(J−J’)/4 とする。
Similarly, in the case of the pixel phase 3, X ′ = X + (CC ′) / 4+ (GG ′) / 4+ (K
−K ′) / 4+ (JJ ′) / 4.

【0155】同様に段階1の場合、 X’=X+(D−D’)/2+(H−H’)/2 とする。Similarly, in the case of step 1, X '= X + (D-D') / 2+ (H-H ') / 2.

【0156】以上で本発明の実施例の構成および動作の
説明を終了する。
The description of the configuration and operation of the embodiment of the present invention has been completed.

【0157】以上の発明の実施例により実験を行った結
果を図17に示す。図17で画像1は、背景が一定の濃
度で、写真が張り付けられている画像、画像2は、コン
ピュータで描画した画像である。図17(c)は可逆の
符号化結果を示す。本発明はJPEG−Spacial
方式よりも良好な性能を示している。また、図17
(a)(b)は、非可逆の符号化結果を示す。横軸は1
ピクセル当たりのビット量を示す。また縦軸は画質を表
す。画像1の場合(a)画像2の場合(b)共に本発明
はJPEG−DCTよりも非常に良好な性質を示す。
FIG. 17 shows the result of an experiment conducted according to the above embodiment of the present invention. In FIG. 17, image 1 is an image having a background with a fixed density and a photograph attached thereto, and image 2 is an image drawn by a computer. FIG. 17C shows a lossless encoding result. The present invention relates to JPEG-Spatial
It shows better performance than the system. FIG.
(A) and (b) show lossy encoding results. The horizontal axis is 1
Indicates the amount of bits per pixel. The vertical axis represents image quality. In both the case of image 1 (a) and the case of image 2 (b), the present invention shows much better properties than JPEG-DCT.

【0158】[0158]

【発明の効果】以上説明したように、本発明によれば、
予測の方向として、上と左に、さらに下と右を加えるこ
とにより予測効率を向上させることができ、写真画像、
コンピュータ生成画像に対しても同様に良好な符号化効
率を得ることができる。また、単一の手法で、可逆/非
可逆双方に用いることができるため、2つの符号化方式
を組み合せる場合に比較してページメモリを除去でき
る、符号化装置を簡単化できる等の効果がある。
As described above, according to the present invention,
By adding the top and left directions and the bottom and right directions, the prediction efficiency can be improved,
Similarly, good coding efficiency can be obtained for computer-generated images. In addition, since a single method can be used for both reversible and irreversible, there are advantages in that a page memory can be removed and an encoding device can be simplified as compared with a case where two encoding methods are combined. is there.

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

【図1】 本発明の符号化装置の構成を示すブロック図
である。
FIG. 1 is a block diagram illustrating a configuration of an encoding device according to the present invention.

【図2】 図1の画素抽出部103を説明する図であ
る。
FIG. 2 is a diagram illustrating a pixel extraction unit 103 in FIG.

【図3】 図1の画素抽出部103を説明する図であ
る。
FIG. 3 is a diagram illustrating a pixel extraction unit 103 in FIG.

【図4】 図1の画素抽出部103を説明する図であ
る。
FIG. 4 is a diagram illustrating a pixel extraction unit 103 in FIG.

【図5】 図1の予測器106〜108を説明する図で
ある
FIG. 5 is a diagram illustrating predictors 106 to 108 in FIG. 1;

【図6】 図1の符号化部117を説明する図である。FIG. 6 is a diagram illustrating an encoding unit 117 in FIG.

【図7】 図1の符号化部117を説明する図である。FIG. 7 is a diagram illustrating an encoding unit 117 in FIG. 1;

【図8】 図1の予測器順位記憶部114を説明する図
である。
FIG. 8 is a diagram illustrating a predictor rank storage unit 114 in FIG. 1;

【図9】 画素抽出部103の他の構成を説明する図で
ある。
FIG. 9 is a diagram illustrating another configuration of the pixel extraction unit 103.

【図10】 予測器の他の構成を説明する図である。FIG. 10 is a diagram illustrating another configuration of the predictor.

【図11】 予測器の他の構成を説明する図である。FIG. 11 is a diagram illustrating another configuration of the predictor.

【図12】 予測器の他の構成を説明する図である。FIG. 12 is a diagram illustrating another configuration of the predictor.

【図13】 符号化装置の他の構成を示すブロック図で
ある。
FIG. 13 is a block diagram illustrating another configuration of the encoding device.

【図14】 予測器順位記憶部114の他の構成を説明
する図である。
FIG. 14 is a diagram illustrating another configuration of the predictor rank storage unit 114.

【図15】 符号化装置の他の構成を示すブロック図で
ある。
FIG. 15 is a block diagram showing another configuration of the encoding device.

【図16】 符号化装置の他の構成を示すブロック図で
ある。
FIG. 16 is a block diagram illustrating another configuration of the encoding device.

【図17】 本発明の実施例の符号化実験結果を示す図
である
FIG. 17 is a diagram illustrating an encoding experiment result according to the embodiment of the present invention.

【図18】 本発明における、符号化の各段階の参照画
素と周波数領域を説明する図である。
FIG. 18 is a diagram illustrating a reference pixel and a frequency domain in each stage of encoding according to the present invention.

【図19】 画像の特性を示す実験例の説明図である。FIG. 19 is an explanatory diagram of an experimental example showing characteristics of an image.

【図20】 第1の従来例を示す構成図である。FIG. 20 is a configuration diagram showing a first conventional example.

【図21】 第1の従来例における符号化復号処理の動
作の一例を示すフローチャートである。
FIG. 21 is a flowchart showing an example of the operation of the encoding / decoding process in the first conventional example.

【図22】 第1の従来例で使用する量子化テーブル例
の説明図である。
FIG. 22 is an explanatory diagram of an example of a quantization table used in the first conventional example.

【図23】 第2の従来例を示す構成図である。FIG. 23 is a configuration diagram showing a second conventional example.

【図24】 第2の従来例における符号化復号処理の動
作の一例を示すフローチャートである。
FIG. 24 is a flowchart showing an example of the operation of the encoding / decoding process in the second conventional example.

【図25】 第2の従来例で使用する予測器の説明図で
ある。
FIG. 25 is an explanatory diagram of a predictor used in the second conventional example.

【図26】 モスキートノイズの説明図である。FIG. 26 is an explanatory diagram of mosquito noise.

【図27】 第1の従来例による実験例の説明図であ
る。
FIG. 27 is an explanatory diagram of an experimental example according to the first conventional example.

【図28】 第2の従来例による実験例の説明図であ
る。
FIG. 28 is an explanatory diagram of an experimental example according to a second conventional example.

【図29】 第3の従来例を示す構成図である。FIG. 29 is a configuration diagram showing a third conventional example.

【符号の説明】[Explanation of symbols]

101 入力画像 102 画像記憶部 103 画素抽出部 104 抽出された符号化画素 105 抽出された参照画素 106 第1の予測器 107 第2の予測器 108 第Nの予測器 109 予測誤差算出器 110 第1の予測結果 111 第2の予測結果 112 第Nの予測結果 113 予測誤差 114 予測器順位記憶部 115 選択部 116 符号化部 117 符号 118 予測器順位変更部 1401 パターン決定部 1402 決定パターン番号 1501 画素誤差拡散部 1502 復号画像算出部 2001 画像入力部 2002 入力画像データ 2003 DCT部 2004 係数データ 2005 係数量子化部 2006 量子化係数データ 2007 係数出力部 2008 係数入力部 2009 量子化係数データ 2010 係数逆量子化部 2011 逆量子化係数データ 2012 逆DCT部 2013 復号画像データ 2014 復号画像出力部 2303 予測部 2304 予測誤差データ 2305 予測誤差出力部 2306 予測誤差入力部 2901 人工画像入力部 2902 入力人工画像データ 2903 人工画像符号化部 2904 人工画像符号データ 2905 人工画像記憶部 2907 人工画像復号部 2908 復号人工画像データ 2909 画像合成部 2910 自然画像入力部 2911 入力自然画像データ 2912 自然画像符号化部 2913 自然画像符号データ 2914 自然画像記憶部 2916 自然画像復号部 2917 復号自然画像データ Reference Signs List 101 input image 102 image storage unit 103 pixel extraction unit 104 extracted encoded pixel 105 extracted reference pixel 106 first predictor 107 second predictor 108 Nth predictor 109 prediction error calculator 110 first Prediction result 111 second prediction result 112 Nth prediction result 113 prediction error 114 predictor rank storage unit 115 selection unit 116 encoding unit 117 code 118 predictor rank change unit 1401 pattern determination unit 1402 decision pattern number 1501 pixel error Spreading unit 1502 Decoded image calculation unit 2001 Image input unit 2002 Input image data 2003 DCT unit 2004 Coefficient data 2005 Coefficient quantization unit 2006 Quantized coefficient data 2007 Coefficient output unit 2008 Coefficient input unit 2009 Quantized coefficient data 2010 Coefficient dequantization unit 2011 Quantized coefficient data 2012 Inverse DCT section 2013 Decoded image data 2014 Decoded image output section 2303 Prediction section 2304 Prediction error data 2305 Prediction error output section 2306 Prediction error input section 2901 Artificial image input section 2902 Input artificial image data 2903 Artificial image coding section 2904 Artificial image code data 2905 Artificial image storage unit 2907 Artificial image decoding unit 2908 Decoded artificial image data 2909 Image synthesis unit 2910 Natural image input unit 2911 Input natural image data 2912 Natural image coding unit 2913 Natural image code data 2914 Natural image storage unit 2916 natural image decoding unit 2917 decoded natural image data

Claims (28)

【特許請求の範囲】[Claims] 【請求項1】 入力画像の少なくとも一部を一時記憶す
る画像記憶手段と、 上記画像記憶手段に記憶された画像の画素を、所定の規
則に基づいて大きさおよび位置が決定される、上記画素
を内包する分割領域に対応づけ、大きな分割領域に対応
する画素から小さな分割領域に対応する画素へと順に符
号化対象画素を選択し、選択された上記符号化対象画素
と、上記符号化対象画素に対応する分割領域内あるいは
上記分割領域に隣接する分割領域内のすでに符号化され
ている参照画素とを抽出する画素抽出手段と、 上記参照画素の画素値を用いて、上記符号化対象画素の
画素値を予測するか、または、上記符号化対象画素の画
素値と、上記参照画素の画素値を用いて予測した画素値
との間の予測誤差を算出する複数の予測手段と、 上記複数の予測手段の選択可能性の順位を記憶する予測
手段順位記憶手段と、 前記複数の予測手段の中から、1の予測手段を選択する
選択手段と、 選択した予測手段の情報をもとに上記予測手段順位記憶
手段に記憶されている予測手段の順位を変更する予測手
段順位変更手段と、 選択された予測手段順位あるいは、予測手段順位と予測
誤差とを符号化する符号化手段とからなることを特徴と
する画像符号化装置。
An image storage unit for temporarily storing at least a part of an input image; and a pixel whose size and position are determined based on a predetermined rule, for pixels of the image stored in the image storage unit. Are assigned to the encoding target pixels in order from the pixel corresponding to the large divisional region to the pixel corresponding to the small divisional region, and the selected encoding target pixel and the encoding target pixel Pixel extraction means for extracting a reference pixel that has already been coded in a divided region corresponding to or in a divided region adjacent to the divided region, using the pixel value of the reference pixel, A plurality of prediction means for predicting a pixel value or calculating a prediction error between a pixel value of the encoding target pixel and a pixel value predicted using the pixel value of the reference pixel, Forecast Prediction means ranking storage means for storing the order of selectability of the measurement means; selection means for selecting one prediction means from among the plurality of prediction means; and prediction based on information of the selected prediction means. A prediction means rank changing means for changing the rank of the prediction means stored in the means rank storage means; and a coding means for coding the selected prediction means rank or the prediction means rank and the prediction error. An image encoding device characterized by the following.
【請求項2】 復号画像を算出する復号画像算出手段を
さらに具備し、上記画像記憶手段は、上記復号画像をさ
らに記憶し、上記選択手段は、上記予測画素値と上記符
号化対象画素の画素値とが等しくない場合であっても、
対応する予測手段を選択し、上記復号画像算出手段は、
復号される画素値を算出し、上記画像記憶手段に復号画
像を記憶し、上記画素抽出手段は、上記参照画素とし
て、上記画像記憶手段に記憶された復号画像の画素値を
抽出することを特徴とする請求項1の画像符号化装置。
2. The image processing apparatus according to claim 1, further comprising: a decoded image calculating unit that calculates a decoded image; wherein the image storage unit further stores the decoded image; Even if the values are not equal,
Selecting the corresponding prediction means, the decoded image calculation means,
Calculating a pixel value to be decoded, storing the decoded image in the image storage means, and extracting the pixel value of the decoded image stored in the image storage means as the reference pixel. The image encoding device according to claim 1, wherein
【請求項3】 上記選択手段は、予測画素値と上記符号
化対象画素の画素値とが等しい予測手段のうちで、最も
予測手段順位の高い予測手段を選択し、全ての予測手段
の予測結果が上記符号化対象画素の画素値と異なる場合
には予測誤差を算出する予測手段を選択することを特徴
とする請求項1の画像符号化装置。
3. The selecting means selects the predicting means having the highest predicting means rank among the predicting means having the same predicted pixel value and the pixel value of the encoding target pixel, and predicting the prediction results of all the predicting means. 2. The image encoding apparatus according to claim 1, wherein when the pixel value is different from the pixel value of the encoding target pixel, a prediction unit that calculates a prediction error is selected.
【請求項4】 上記選択手段は、予測手段順位の高い順
に、上記予測手段の予測値と、上記符号化対象画素の画
素値とを比較し、その差分の絶対値が所定の値より小さ
い時にはその予測手段を選択し、全ての予測手段の差分
の絶対値が所定の値より小さくない場合には予測誤差を
算出する予測手段を選択することを特徴とする請求項2
の画像符号化装置。
4. The selecting means compares the predicted value of the predicting means with the pixel value of the encoding target pixel in descending order of the predicting means rank, and when the absolute value of the difference is smaller than a predetermined value. 3. The method according to claim 2, wherein said prediction means is selected, and when the absolute value of the difference between all the prediction means is not smaller than a predetermined value, a prediction means for calculating a prediction error is selected.
Image encoding device.
【請求項5】 上記選択手段は、所定の予測手段の予測
値と、上記符号化対象画素の画素値とを比較し、その差
分の絶対値が所定の値より小さい時にはその予測手段を
選択し、それ以外の場合は、予測画素値と上記符号化対
象画素の画素値とが等しい予測手段のうちで、最も予測
手段順位の高い予測手段を選択し、全ての予測手段の予
測結果が符号化を行う画素の画素値と異なる場合には予
測誤差を算出する予測手段を選択することを特徴とする
請求項2の画像符号化装置。
5. The selection means compares a prediction value of a predetermined prediction means with a pixel value of the pixel to be encoded, and selects the prediction means when an absolute value of the difference is smaller than a predetermined value. Otherwise, among the prediction means having the same predicted pixel value and the pixel value of the encoding target pixel, the prediction means having the highest prediction means rank is selected, and the prediction results of all the prediction means are coded. 3. The image encoding apparatus according to claim 2, wherein a prediction unit that calculates a prediction error is selected when the pixel value is different from the pixel value of the pixel on which the image encoding is performed.
【請求項6】 画素誤差拡散手段をさらに具備し、上記
画素誤差拡散手段は、入力参照画素と、復号参照画素と
の差分を重み付けして加算し、さらに上記符号化対象画
素の画素値に加算し、その結果を符号化対象画素の画素
値とすることを特徴とする請求項2の画像符号化装置。
6. A pixel error diffusion unit further comprising a pixel error diffusion unit, which weights and adds a difference between an input reference pixel and a decoded reference pixel, and further adds the difference to a pixel value of the encoding target pixel. 3. The image encoding apparatus according to claim 2, wherein the result is used as a pixel value of an encoding target pixel.
【請求項7】 予測誤差量子化手段をさらに具備し、上
記予測誤差量子化手段は、所定の量子化係数によって、
予測誤差を量子化することを特徴とする請求項1の画像
符号化装置。
7. The apparatus further comprises a prediction error quantization means, wherein said prediction error quantization means calculates
2. The image coding apparatus according to claim 1, wherein the prediction error is quantized.
【請求項8】 上記予測手段は、参照画素の画素値を予
測値とすることを特徴とする請求項1記載の画像符号化
装置。
8. The image coding apparatus according to claim 1, wherein said prediction means sets a pixel value of a reference pixel as a prediction value.
【請求項9】 上記予測手段は、複数の参照画素の画素
値の線形和を予測値とすることを特徴とする請求項1記
載の画像符号化装置。
9. The image coding apparatus according to claim 1, wherein said prediction means uses a linear sum of pixel values of a plurality of reference pixels as a prediction value.
【請求項10】 上記画素抽出手段は、上記符号化対象
画素の分割領域内の相対位置に応じて、参照画素の位置
および数を変化させることを特徴とする請求項1記載の
画像符号化装置。
10. The image encoding apparatus according to claim 1, wherein said pixel extracting means changes the position and the number of reference pixels according to the relative position of said encoding target pixel in the divided area. .
【請求項11】 上記予測手段順位変更手段は、予測誤
差を算出する予測手段の予測手段順位を固定とすること
を特徴とする請求項1記載の画像符号化装置。
11. The image coding apparatus according to claim 1, wherein said prediction means rank changing means fixes the prediction means rank of a prediction means for calculating a prediction error.
【請求項12】 上記予測手段順位変更手段は、予測誤
差を算出する予測手段の予測手段順位を、他の予測手段
と同様に変化させることを特徴とする請求項1記載の画
像符号化装置。
12. The image coding apparatus according to claim 1, wherein the prediction means rank changing means changes the prediction means rank of the prediction means for calculating the prediction error in the same manner as other prediction means.
【請求項13】 上記画像抽出手段は、上記画像記憶手
段に記憶された画像を縦および横が2のN乗の画素数の
矩形領域に分割し、第1の符号化画素を、該矩形領域の
右下の画素として抽出し、第2の符号化画素を、該矩形
領域を縦横均等に4分割した右下の画素として抽出し、
さらに、矩形領域を縦横均等に4分割してできる矩形領
域の右下の画素を矩形領域が1×1画素の大きさになる
まで次々と抽出することを特徴とする請求項1記載の画
像符号化装置。
13. The image extracting means divides the image stored in the image storing means into rectangular areas each having a vertical and horizontal number of 2 N pixels, and divides the first encoded pixel into the rectangular area. Is extracted as a lower right pixel, and a second encoded pixel is extracted as a lower right pixel obtained by equally dividing the rectangular area into four in the vertical and horizontal directions,
2. The image code according to claim 1, further comprising extracting lower right pixels of the rectangular area formed by dividing the rectangular area equally into four in the vertical and horizontal directions until the rectangular area has a size of 1 × 1 pixels. Device.
【請求項14】 上記予測手段順位記憶手段は、符号化
を行う画素と参照画素の位置関係によって、別々の順位
を記憶し、上記予測手段順位変更手段は、符号化を行う
画素と参照画素の位置関係によって、変更する順位を変
えることを特徴とする請求項1記載の画像符号化装置。
14. The prediction means rank storage means stores different ranks depending on the positional relationship between a pixel to be coded and a reference pixel, and the prediction means rank change means stores a rank between a pixel to be coded and a reference pixel. 2. The image encoding apparatus according to claim 1, wherein a change order is changed according to a positional relationship.
【請求項15】 上記予測手段順位変更手段は、直前に
選択された予測手段を順位1位とし、その他の予測手段
の順位は順次1づつ下げることを特徴とする請求項1記
載の画像符号化装置。
15. The image coding apparatus according to claim 1, wherein said prediction means rank changing means sets the prediction means selected immediately before as the first rank, and sequentially lowers the ranks of the other prediction means by one. apparatus.
【請求項16】 上記予測手段順位変更手段は、事前に
選択された予測手段の頻度を記憶しておき、その頻度に
基づいて予測手段順位を決定することを特徴とする請求
項1記載の画像符号化装置。
16. An image according to claim 1, wherein said prediction means rank changing means stores the frequency of the prediction means selected in advance, and determines the prediction means rank based on the frequency. Encoding device.
【請求項17】 上記予測手段は、参照画素値のうち同
一画素値の複数の参照画素の位置関係から予測を行うこ
とを特徴とする請求項1記載の画像符号化装置。
17. The image coding apparatus according to claim 1, wherein said prediction means performs prediction from a positional relationship between a plurality of reference pixels having the same pixel value among the reference pixel values.
【請求項18】 上記選択手段は、上記予測手段によっ
て、上記予測手段を選択するか選択しないかの所定の値
を変えることを特徴とする請求項4または5記載の画像
符号化装置。
18. The image coding apparatus according to claim 4, wherein said selection means changes a predetermined value for selecting or not selecting said prediction means by said prediction means.
【請求項19】 上記所定の予測手段は、符号化を行う
画素と参照画素の位置関係によって、異なることを特徴
とする請求項5記載の画像符号化装置。
19. The image coding apparatus according to claim 5, wherein said predetermined prediction means differs depending on a positional relationship between a pixel to be coded and a reference pixel.
【請求項20】 上記所定の値は、符号化を行う画素と
参照画素の位置関係によって、異なることを特徴とする
請求項4または5記載の画像符号化装置。
20. The image encoding apparatus according to claim 4, wherein the predetermined value differs depending on a positional relationship between a pixel to be encoded and a reference pixel.
【請求項21】 上記量子化係数は、符号化を行う画素
と参照画素の位置関係によって、異なることを特徴とす
る請求項7記載の画像符号化装置。
21. The image coding apparatus according to claim 7, wherein the quantization coefficient differs depending on a positional relationship between a pixel to be coded and a reference pixel.
【請求項22】 上記画素抽出手段によって、分割され
る分割領域の最初に符号化を行う画素の符号化誤差を許
容しないことを特徴とする請求項2または7記載の画像
符号化装置。
22. The image coding apparatus according to claim 2, wherein the pixel extracting means does not allow a coding error of a pixel to be coded at the beginning of the divided area to be divided.
【請求項23】 参照画素のパターン決定手段をさらに
具備し、上記パターン決定手段は、参照画素の画素値に
よって参照画素パターンを決定し、上記予測手段順位記
憶手段は、パターン毎に予測手段順位を記憶し、上記予
測手段順位変更手段では、パターン毎に予測手段順位を
変更することを特徴とする請求項1記載の画像符号化装
置。
23. The method further comprising: a reference pixel pattern determining unit, wherein the pattern determining unit determines a reference pixel pattern based on a pixel value of the reference pixel, and the predicting unit rank storing unit stores a prediction unit rank for each pattern. 2. The image coding apparatus according to claim 1, wherein the storing unit changes the prediction unit rank for each pattern.
【請求項24】 上記パターン決定手段は、同一画素値
となる参照画素の位置を調べることを特徴とする請求項
23記載の画像符号化装置。
24. The image coding apparatus according to claim 23, wherein said pattern determination means checks a position of a reference pixel having the same pixel value.
【請求項25】 上記パターン決定手段は、参照画素の
画素値を平面で近似できるかどうか調べることを特徴と
する請求項23記載の画像符号化装置。
25. The image coding apparatus according to claim 23, wherein said pattern determination means checks whether or not the pixel value of the reference pixel can be approximated by a plane.
【請求項26】 上記符号化手段は、上記選択手段で選
択を行った順に、1位となった予測手段順位のランレン
グスと、1位以外の予測手段順位と、予測誤差とを符号
化することを特徴とする請求項1記載の画像符号化装
置。
26. The encoding means encodes the run length of the first rank of the prediction means, the rank of the prediction means other than the first rank, and the prediction error in the order of selection by the selection means. The image encoding device according to claim 1, wherein:
【請求項27】 上記符号化手段は、分割された分割領
域の最後の画素まで、全て予測手段順位が1位の場合
は、ランレングス符号化の代わりにブロック終端符号を
付加することを特徴とする請求項26記載の画像符号化
装置。
27. The encoding device according to claim 27, wherein when the prediction means rank is the first in the last pixel of the divided area, a block end code is added instead of run-length encoding. 27. The image encoding device according to claim 26, wherein:
【請求項28】 上記符号化手段は、上記選択手段で選
択を行った順に、1位以外の予測手段順位と、予測誤差
を符号化し、さらに、1位か、1位以外かの1ビットの
予測的中情報を分割領域毎に符号化することを特徴とす
る請求項1記載の画像符号化装置。
28. The encoding means encodes prediction means other than the first rank and a prediction error in the order of selection by the selection means, and further encodes one bit of the first or non-first place. 2. The image encoding apparatus according to claim 1, wherein predictive hit information is encoded for each divided area.
JP13623197A 1997-05-27 1997-05-27 Image coder Pending JPH10327418A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13623197A JPH10327418A (en) 1997-05-27 1997-05-27 Image coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13623197A JPH10327418A (en) 1997-05-27 1997-05-27 Image coder

Publications (1)

Publication Number Publication Date
JPH10327418A true JPH10327418A (en) 1998-12-08

Family

ID=15170359

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13623197A Pending JPH10327418A (en) 1997-05-27 1997-05-27 Image coder

Country Status (1)

Country Link
JP (1) JPH10327418A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7715638B2 (en) 2003-01-13 2010-05-11 Nokia Corporation Processing of images using a limited number of bits
JP2010187181A (en) * 2009-02-12 2010-08-26 Fuji Xerox Co Ltd Image encoding device, image forming apparatus, and program
US8858809B2 (en) 2012-03-22 2014-10-14 Kabushiki Kaisha Toshiba Method of manufacturing magnetic recording medium
US9036934B2 (en) 2013-03-22 2015-05-19 Kabushiki Kaisha Toshiba Image encoder and image processing system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7715638B2 (en) 2003-01-13 2010-05-11 Nokia Corporation Processing of images using a limited number of bits
USRE43256E1 (en) 2003-01-13 2012-03-20 Nokia Corporation Processing of images using a limited number of bits
JP2010187181A (en) * 2009-02-12 2010-08-26 Fuji Xerox Co Ltd Image encoding device, image forming apparatus, and program
US8858809B2 (en) 2012-03-22 2014-10-14 Kabushiki Kaisha Toshiba Method of manufacturing magnetic recording medium
US9036934B2 (en) 2013-03-22 2015-05-19 Kabushiki Kaisha Toshiba Image encoder and image processing system

Similar Documents

Publication Publication Date Title
US10045034B2 (en) System and method for using pattern vectors for video and image coding and decoding
Wu An algorithmic study on lossless image compression
US6947600B1 (en) Information processing method, apparatus and storage medium for receiving and decoding a code sequence obtained by encoding an image
JP5770813B2 (en) Method for decoding MPEG-4 video signal, non-transitory computer readable storage medium, decoder and program
JP3087835B2 (en) Image encoding method and apparatus and image decoding method and apparatus
JPH10327418A (en) Image coder
JPH08116450A (en) Image compressor and image expander
JP2002077920A (en) Picture compressing apparatus and method therefor
JP3670554B2 (en) Image signal encoding device / decoding device, image signal encoding method / decoding method, and image signal encoding / decoding program recording medium
JPH11146394A (en) Image analyzer and image coding decoder
JP2001128182A (en) Image encoding method and computer-readable recording medium storing image encoding program
JP4743884B2 (en) Image coding apparatus and control method thereof
JP2004336247A (en) Image coding method, image coder and computer program
Falkowski Spectral-and discrete-function-based gray-scale image compression
KR20050061448A (en) A method of communicating data within a coder
Lehtinen Predictive depth coding of wavelet transformed images

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040727

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041116