JP2002232293A - Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method - Google Patents

Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method

Info

Publication number
JP2002232293A
JP2002232293A JP2001022138A JP2001022138A JP2002232293A JP 2002232293 A JP2002232293 A JP 2002232293A JP 2001022138 A JP2001022138 A JP 2001022138A JP 2001022138 A JP2001022138 A JP 2001022138A JP 2002232293 A JP2002232293 A JP 2002232293A
Authority
JP
Japan
Prior art keywords
vector
image data
value
dictionary
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001022138A
Other languages
Japanese (ja)
Inventor
Takashi Miura
高志 三浦
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.)
Hudson Soft Co Ltd
Original Assignee
Hudson Soft 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 Hudson Soft Co Ltd filed Critical Hudson Soft Co Ltd
Priority to JP2001022138A priority Critical patent/JP2002232293A/en
Publication of JP2002232293A publication Critical patent/JP2002232293A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image data compressor or the like capable of improving compression of a DC value and improving entire compression performance by encoding the DC value so that the code amount of the DC value can be reduced. SOLUTION: In an image data compressor 1, the image data of an original image are inputted by an image data input part 3, a DC image is prepared by a DC image preparing part 5, and the vector quantization of mean value separate type block encoding concerning the DC value is performed by a DC vector quantizing part 6. The encoded DC vector is decoded by a DC vector decoding part 13, and the vector quantization of mean value separate type block encoding concerning an AC value is performed by an AC vector quantizing part 16.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像データ圧縮装
置、画像データ圧縮方法、画像データ圧縮方法をコンピ
ュータに実行させるためのプログラム、及び、画像デー
タ圧縮方法をコンピュータに実行させるためのプログラ
ムを記録したコンピュータ読み取り可能な記録媒体に関
し、特に、画像データを複数画素のブロックに分割し、
各ブロックごとの画素値の平均を表すDC値の符号化を
行う画像データ圧縮装置、画像データ圧縮方法、画像デ
ータ圧縮方法をコンピュータに実行させるためのプログ
ラム、及び、画像データ圧縮方法をコンピュータに実行
させるためのプログラムを記録したコンピュータ読み取
り可能な記録媒体に関する。
The present invention relates to an image data compression apparatus, an image data compression method, a program for causing a computer to execute the image data compression method, and a program for causing a computer to execute the image data compression method. With respect to the computer-readable recording medium, especially, the image data is divided into a plurality of pixel blocks,
An image data compression device that encodes a DC value representing an average of pixel values for each block, an image data compression method, a program for causing a computer to execute the image data compression method, and an image data compression method executed by a computer The present invention relates to a computer-readable recording medium that stores a program for causing a computer to execute the program.

【0002】[0002]

【従来の技術】コンピュータで利用可能な元データであ
る画像データを符号化処理によってデータ量を削減する
データ圧縮技術における要素技術の一つとして、ベクト
ル量子化法がある。
2. Description of the Related Art A vector quantization method is one of the elemental techniques in a data compression technique for reducing the amount of image data, which is original data usable by a computer, by encoding.

【0003】ベクトル量子化法は、元データから適当な
個数のデータサンプルをまとめてベクトルとして扱い、
符号化対象ベクトルに対して、予め準備した辞書と呼ば
れるベクトルの集合から、符号化対象ベクトルとの誤差
が許容値以内である最適なベクトルを検索し、符号化対
象ベクトルを辞書における番号によって表現すること
で、情報量を削減する方法である。
In the vector quantization method, an appropriate number of data samples from the original data are collectively treated as a vector.
For the encoding target vector, an optimal vector whose error from the encoding target vector is within an allowable value is retrieved from a set of vectors called a dictionary prepared in advance, and the encoding target vector is represented by a number in the dictionary. This is a method for reducing the amount of information.

【0004】なお、誤差の許容値を小さくすべく近似精
度の向上及び辞書のデータ量の削減のために、符号化対
象ベクトルを、辞書における番号に加えて、乗数係数と
いう付加情報によって表現する方法が、国際公開番号W
O00/02393号に開示されている。
In order to improve the approximation accuracy and reduce the amount of data in the dictionary in order to reduce the allowable value of the error, the encoding target vector is represented by additional information called a multiplier coefficient in addition to the number in the dictionary. But international publication number W
No. 00/02393.

【0005】図7は、従来の画像データ圧縮装置の内部
構成を示した図であり、図8は、図7の画像データ圧縮
装置の動作を説明するためのフロー図である。
FIG. 7 is a diagram showing the internal configuration of a conventional image data compression device, and FIG. 8 is a flowchart for explaining the operation of the image data compression device of FIG.

【0006】画像データ圧縮装置51は、画像データ入
力部53と、DC画像作成部55と、DPCM処理部5
7と、ランレングス符号部59と、ハフマン符号部61
と、ランレングス復号部63と、ハフマン復号部65
と、DC画像復号部67と、ACベクトル作成部69
と、AC用辞書保持部71と、ACベクトル符号部73
とを備える。
The image data compression device 51 includes an image data input unit 53, a DC image creation unit 55, and a DPCM processing unit 5.
7, a run length encoding unit 59, and a Huffman encoding unit 61
, Run-length decoding unit 63 and Huffman decoding unit 65
, A DC image decoding unit 67 and an AC vector creation unit 69
, AC dictionary holding unit 71, AC vector encoding unit 73
And

【0007】画像データ入力部53は、元データである
画像データをDC画像作成部55及びACベクトル作成
部69に入力する。DC画像作成部55は、DC画像を
作成し、DC画像データをDPCM処理部57に入力す
る。
[0007] The image data input unit 53 inputs image data as original data to the DC image generation unit 55 and the AC vector generation unit 69. The DC image creation unit 55 creates a DC image and inputs the DC image data to the DPCM processing unit 57.

【0008】DPCM処理部57は、DC画像に対して
後述するDPCM符号化処理を行い、処理結果をランレ
ングス符号部59及びハフマン符号部61に入力する。
ランレングス符号部59は、後述するランレングス符号
化処理を行い、ハフマン符号部61は、後述するハフマ
ン符号化処理を行い、DC値符号が出力される。
[0008] The DPCM processing unit 57 performs a DPCM encoding process described below on the DC image, and inputs the processing result to the run-length encoding unit 59 and the Huffman encoding unit 61.
The run-length encoding unit 59 performs a later-described run-length encoding process, and the Huffman encoding unit 61 performs a later-described Huffman encoding process, and outputs a DC value code.

【0009】出力されるDC値符号は、AC値符号の生
成のために、ランレングス復号部63及びハフマン復号
部65に、それぞれ入力される。ランレングス復号部6
3は、入力されたDC値符号に対してランレングス復号
化処理を行い、ハフマン復号部65は、入力されたDC
値符号に対してハフマン復号化処理を行う。
The output DC value code is input to a run-length decoding unit 63 and a Huffman decoding unit 65 for generating an AC value code. Run-length decoding unit 6
3 performs a run-length decoding process on the input DC value code, and the Huffman decoding unit 65 outputs
Huffman decoding is performed on the value code.

【0010】ランレングス復号部63の処理結果及びハ
フマン復号部65の処理結果が、DC画像復号部67に
入力され、DC画像復号部67は、DC画像を復号して
生成し、復号したDC画像データをACベクトル作成部
69に入力する。
[0010] The processing result of the run-length decoding unit 63 and the processing result of the Huffman decoding unit 65 are input to a DC image decoding unit 67. The DC image decoding unit 67 decodes the DC image to generate and decode the DC image. The data is input to the AC vector creation unit 69.

【0011】ACベクトル作成部69は、入力された元
データとDC画像データとから、ACベクトルを作成
し、ACベクトル符号部73に入力する。ACベクトル
符号部73は、ベクトル量子化に必要なAC用辞書保持
部71に保持されたAC用辞書であるベクトルの集合か
ら、ACベクトルとの誤差が許容値以内である最適なベ
クトルを検索し、番号及び乗数係数によって表現したA
C値符号を求め、出力部として機能し、DC値、ベクト
ル番号及び乗数係数をAC値の符号として出力する。
The AC vector creation section 69 creates an AC vector from the input original data and DC image data, and inputs the created AC vector to the AC vector encoding section 73. The AC vector encoding unit 73 searches the set of vectors, which are the AC dictionaries held in the AC dictionary holding unit 71 required for the vector quantization, for an optimum vector whose error from the AC vector is within an allowable value. , A expressed by a number and a multiplier coefficient
The C value code is obtained and functions as an output unit, and outputs a DC value, a vector number, and a multiplier coefficient as a code of an AC value.

【0012】図8を参照して、動作について説明する。
ステップST1において、元データである画像データの
読み込みが行われる。RGB系の画像がYUV系に変換
されて読み込みが行われる。Yは輝度データであり、
U,Vは色差データに相当し、U,Vは横2画素の輝度
平均を用いてダウンサンプリングされる。
The operation will be described with reference to FIG.
In step ST1, image data as original data is read. An RGB image is converted to a YUV image and read. Y is luminance data,
U and V correspond to color difference data, and U and V are down-sampled using the average luminance of two horizontal pixels.

【0013】ステップST2において、画像ブロックご
とにDC値の分離が行われ、ステップST3において、
DC画像が作成される。以下、さらに説明する。
In step ST2, DC values are separated for each image block, and in step ST3,
A DC image is created. This will be further described below.

【0014】まず、元データである画像データから4×
4画素のブロックデータTJ,Iが取り出される。ブロッ
クデータTJ,Iに含まれる16画素データの平均である
DC値Mが求められる。DC値MがDC画像の記憶位置
DCJ,Iに格納される。
First, 4 ×
Block data T J, I of four pixels is extracted. A DC value M, which is an average of 16 pixel data included in the block data T J, I is obtained. The DC value M is stored in the storage position DC J, I of the DC image.

【0015】ステップST4において、DC値にDPC
M処理が施され、ランレングス及びハフマン符号化が行
われ、ステップST5において、DC値の符号が出力さ
れる。
In step ST4, DPC is added to the DC value.
M processing is performed, run length and Huffman coding are performed, and in step ST5, a code of a DC value is output.

【0016】DPCM処理について説明する。DC画像
のJ行、I列のDC値をDJ,Iとするとき、DJ,Iの予測
値D′J,IをD′J,I=(DJ,I-1+DJ-1,I)/2によ
り求める。予測誤差ΔDJ,IをΔDJ,I=DJ,I−D′J,I
により求める。
The DPCM processing will be described. When J rows of the DC image, the DC value of the column I D J, and I, D J, the prediction value D 'J, the I D' of I J, I = (D J , I-1 + D J-1 , I ) / 2. Let the prediction error ΔD J, I be ΔD J, I = D J, I −D ′ J, I
Ask by

【0017】ここで、DC値は画像ブロックに含まれる
16画素の平均値であるから、DC値の変化は画素値の
変化に比べれば非常に少ないので、予測誤差ΔD
J,Iは、小さな値であることが期待される。値が小さけ
れば、符号に割り当てるビット数の削減が可能であるた
め、さらに符号量を削減するために予測誤差ΔDJ,I
目標画品質に応じた量子化係数Qで整数除算され、その
値が量子化予測誤差ΔdJ,Iとして、ΔdJ,I=(in
t)(ΔDJ,I/Q)により求められる。ここで、(i
nt)(a)は、実数aを四捨五入した値を示す。な
お、量子化係数Qは、高画質が要求されれば小さな値と
なる係数である。
Here, since the DC value is an average value of 16 pixels included in the image block, the change in the DC value is very small as compared with the change in the pixel value, so that the prediction error ΔD
J and I are expected to be small values. If the value is small, the number of bits allocated to the code can be reduced. Therefore, in order to further reduce the code amount, the prediction error ΔD J, I is integer-divided by the quantization coefficient Q according to the target image quality. Is the quantization prediction error Δd J, I , and Δd J, I = (in
t) (ΔD J, I / Q). Here, (i
nt) (a) indicates a value obtained by rounding the real number a. The quantization coefficient Q is a coefficient having a small value when high image quality is required.

【0018】量子化予測誤差ΔdJ,Iは、ゼロという値
になる場合が多く、ステップST4において、ゼロに対
してはランレングス符号化を行い、非ゼロに対してはハ
フマン符号化を行って、符号量を削減する。
In many cases , the quantization prediction error Δd J, I has a value of zero. In step ST4, run-length encoding is performed on zero and Huffman encoding is performed on non-zero. , To reduce the code amount.

【0019】ランレングス符号化は、データ列の中の同
じ記号の連続を圧縮するために用いられる簡単な技法で
あり、連続が生じている場合に圧縮は平均的なものとな
る。
[0019] Run-length coding is a simple technique used to compress a sequence of the same symbols in a sequence of data, where the compression is average when a sequence occurs.

【0020】図9は、ハフマン符号化を説明するための
ハフマン木の一例を示した図である。以下の5つの手続
きにより、ハフマン木が作られる。
FIG. 9 is a diagram showing an example of a Huffman tree for explaining Huffman coding. A Huffman tree is created by the following five procedures.

【0021】第1は、フリーノードリストから、最も重
みの小さな2つのノードを取り出す手続きである。
The first is a procedure for extracting two nodes having the smallest weight from the free node list.

【0022】第2は、取り出された2つのノードに対し
て親ノードを作り、2つの子ノードの重み和を、親ノー
ドに対する重みとする手続きである。
The second is a procedure in which a parent node is created for the two extracted nodes and the weight sum of the two child nodes is set as the weight for the parent node.

【0023】第3は、フリーノードのリストのその親ノ
ードを加え、2つの子ノードをリストから削除する手続
きである。
The third is a procedure for adding the parent node of the free node list and deleting two child nodes from the list.

【0024】第4は、子ノードのうちの一方にビット0
を割り当て、他方にビット1を割り当て、親ノードとの
間で部分木を作る手続きである。
Fourth, bit 0 is assigned to one of the child nodes.
, And bit 1 to the other, to create a subtree with the parent node.

【0025】第5は、第1から第4までの手続きを、フ
リーノードのリストに残っているノードが一つになるま
で繰り返し、最後に残ったノードを木の根に割り当てる
手続きである。
Fifth, the first to fourth procedures are repeated until the number of nodes remaining in the free node list becomes one, and the last remaining node is assigned to the root of the tree.

【0026】図9に示されたハフマン木は、上記第1か
ら第5の手続きで得られており、根から各記号に沿って
見ていくと、記号Aの符号が「0」、記号Bの符号が
「100」、記号Cの符号が「101」、記号Dの符号
が「110」、記号Eの符号が「111」であることが
示されている。
The Huffman tree shown in FIG. 9 is obtained by the above first to fifth procedures. When viewed from the root along each symbol, the sign of the symbol A is “0” and the symbol B is , The symbol C is “101”, the symbol D is “110”, and the symbol E is “111”.

【0027】図8のステップST6において、DC値符
号が復号されて、DC画像が復号される。この復号は、
基本的には、ステップST3からステップST5までの
処理の逆の処理によって行われる。
In step ST6 of FIG. 8, the DC value code is decoded, and the DC image is decoded. This decryption
Basically, the processing is performed by the reverse of the processing from step ST3 to step ST5.

【0028】ステップST7において、画像ブロックご
とにACベクトルを求める計算処理が行われ、ステップ
ST8において、ACベクトルが全て得られる。ACベ
クトルは、4×4の画像ブロックに対応する16次元の
残差ベクトル<d>であり、<d>=TJ,I−DJ,Iで表
される。ここで、<>は、ベクトルを表している。な
お、ACベクトル<d>の各要素には、それぞれ8ビッ
トが割り付けられる。
In step ST7, a calculation process for obtaining an AC vector is performed for each image block, and in step ST8, all the AC vectors are obtained. The AC vector is a 16-dimensional residual vector <d> corresponding to a 4 × 4 image block, and is represented by <d> = T J, I −D J, I. Here, <> represents a vector. In addition, 8 bits are allocated to each element of the AC vector <d>.

【0029】そして、ステップST9において、ACベ
クトルのベクトル量子化が行われ、AC値の符号化が行
われる。ここで行われる予め準備した辞書を用いたベク
トル量子化による符号化について、以下詳細に説明す
る。
Then, in step ST9, the vector quantization of the AC vector is performed, and the encoding of the AC value is performed. The encoding performed by vector quantization using a prepared dictionary performed here will be described in detail below.

【0030】まず、グラム・シュミットの直交化につい
て説明する。グラム・シュミットの直交化とは、n次元
内積空間Vの一つの基底{v1,・・・,vn}よりVの正
規直交基底{v′1,・・・,v′n}を構成する方法であ
る。
First, the Gram-Schmidt orthogonalization will be described. The orthogonalization of the Gram-Schmidt configuration, one of the underlying n-dimensional inner-product space V {v 1, ···, v n} from the V orthonormal basis {v '1, ···, v ' n} the How to

【0031】第1の基底ベクトル<v>(但し、<u
1>に相当する)とすると、第1の正規化基底ベクトル
<v′1>は、単位ベクトルであるから、第(1)式の
ように表される。 <v′>=<v>/‖<v>‖=α11<u1> ・・・(1)
The first basis vector <v 1 > (where <u
1 >), the first normalized base vector <v ′ 1 > is a unit vector, and is expressed as in the following equation (1). <V ′ 1 > = <v 1 > / ‖ <v 1 > ‖ = α 11 <u 1 > (1)

【0032】次に、第2の基底ベクトル<u2>が抽出
されたとすると、第1の正規化基底ベクトル<v′
と直交するような第2の直交基底ベクトル<v2>は、
第(2)式のように置くことができる。 <v2>=<u2>+k<v′> ・・・(2)
Next, assuming that the second base vector <u 2 > is extracted, the first normalized base vector <v ′ 1 >
A second orthogonal basis vector <v 2 > that is orthogonal to
Equation (2) can be used. <V 2 > = <u 2 > + k <v ′ 1 > (2)

【0033】(<a>,<b>)をベクトルの内積とし
て表記すると,(<v2>,<v′ >)=0より、第
(3)式の関係が得られる。 (<v2>,<v′>)=(<u2>+k<v′>,<v′>) =(<u2>,<v′>)+k(<v′>,<v′>) =(<u2>,<v′>)+k=0 ・・・(3)
Let (<a>, <b>) be the inner product of the vector
Notation, (<vTwo>, <V ' 1>) = 0,
Equation (3) is obtained. (<VTwo>, <V '1>) = (<UTwo> + K <v '1>, <V '1>) = (<UTwo>, <V '1>) + K (<v ′1>, <V '1>) = (<UTwo>, <V '1>) + K = 0 (3)

【0034】このときのスカラー係数kは、k=−(<
2>,<v′>)となる。kを第(2)式に代入す
ると、第(4)式が得られる。 <v2>=<u2>−(<u2>,<v′>)<v′> ・・・(4)
The scalar coefficient k at this time is k = − (<
u 2 >, <v ′ 1 >). By substituting k into Equation (2), Equation (4) is obtained. <V 2 > = <u 2 > − (<u 2 >, <v ′ 1 >) <v ′ 1 > (4)

【0035】第2の正規化基底ベクトル<v′2>も単
位ベクトルであるから、第(5)式のようになる。 <v′2>=<v2>/‖<v2>‖=α21<u1>+α22<u2> ・・・(5)
Since the second normalized basis vector <v ′ 2 > is also a unit vector, it is expressed by the following equation (5). <V ′ 2 > = <v 2 > / ‖ <v 2 > ‖ = α 21 <u 1 > + α 22 <u 2 > (5)

【0036】同様にして、一般に第nの正規化基底ベク
トル<v′n>は、第(6)式となる。但し、第(6)
式におけるαniは、展開係数である。
Similarly, in general, the n-th normalized basis vector <v ′ n > is given by the following equation (6). However, the (6)
Α ni in the equation is an expansion coefficient.

【0037】[0037]

【数1】 (Equation 1)

【0038】以上の考えを前提にして、符号化対象AC
ベクトル<AC>を考える。符号化対象ACベクトル<
AC>は、16次元のベクトルであり、各画素に対応し
て順番付けられた16個のAC値を要素としている。
Based on the above idea, the encoding target AC
Consider the vector <AC>. AC vector to be encoded <
AC> is a 16-dimensional vector, and has 16 AC values ordered in correspondence with each pixel as elements.

【0039】まず、<AC>を辞書ベクトル<ACV1
>を用いて近似してみる。<AC>と辞書ベクトル<A
CV1>に乗数係数α1を掛けたα1<ACV1>との差ベ
クトル{<AC>−α1<ACV1>}の大きさが最小とな
るのは、α1<ACV1>と差ベクトル{<AC>−α1
ACV1>}とが直交するときである。したがって、内積
が0であることを表す第(7)式が得られる。 ({<AC>−α1<ACV1>},α1<ACV1>)=0 ・・・(7)
First, <AC> is converted to a dictionary vector <ACV 1
Try to approximate using>. <AC> and dictionary vector <A
The magnitude of the difference vector between CV 1> alpha 1 multiplied by a multiplier factor alpha 1 to <ACV 1>{<AC> -α 1 <ACV 1>} is minimized, alpha 1 and <ACV 1> Difference vector {<AC> −α 1 <
ACV 1 >} is orthogonal. Accordingly, Expression (7) representing that the inner product is 0 is obtained. ({<AC> −α 1 <ACV 1 >}, α 1 <ACV 1 >) = 0 (7)

【0040】α1について解くと、α1=(<AC>,<
ACV1>)/(<ACV1,ACV 1>が得られる。そ
して、符号化対象ベクトル<AC>は、第(8)式のよ
うに近似される。 <AC′>=α1<ACV1> ・・・(8)
Α1Solving for α1= (<AC>, <
ACV1>) / (<ACV1, ACV 1> Is obtained. So
Then, the encoding target vector <AC> is expressed by the following equation (8).
Approximation. <AC '> = α1<ACV1> ... (8)

【0041】次に、辞書ベクトル<ACV1>による近
似誤差ベクトル<AC1>は、第(8)式も使われて、
第(9)式のように表される。 <AC1>=<AC>−<AC′>=<AC>−α1<ACV1> ・・・(9)
Next, an approximation error vector <AC 1 > based on the dictionary vector <ACV 1 > is obtained by using the equation (8).
It is expressed as in equation (9). <AC 1 > = <AC> − <AC ′> = <AC> −α 1 <ACV 1 > (9)

【0042】そして、図8のステップST10におい
て、この近似誤差ベクトルが最も小さくなる辞書内のベ
クトル番号と乗数係数がAC値の符号として出力され
る。
Then, in step ST10 in FIG. 8, the vector number and the multiplier coefficient in the dictionary in which the approximate error vector is the smallest are output as the sign of the AC value.

【0043】[0043]

【発明が解決しようとする課題】ところで、画像データ
Y、U、Vはそれぞれ8ビットで表されるので、それぞ
れのDC値の符号量は、前述したように、16画素に対
して1バイト(8ビット)である。ここで、Yは全画素
のデータを使用し、UとVは4画素ごとに1データだけ
を使用することを想定すると、すなわち、Y:U:V=
4:1:1であるとすると、1画素のデータには、Y、
U、Vのそれぞれについて1個ずつのデータが必要なた
め、1画素のデータ量の合計は、Yを1とすると、Uと
Vは1/4のデータ量となり、1+1/4+1/4=
1.5のデータ量になる。
Since the image data Y, U, and V are each represented by 8 bits, the code amount of each DC value is, as described above, 1 byte (16 bytes) for 16 pixels. 8 bits). Here, assuming that Y uses data of all pixels and U and V use only one data for every four pixels, that is, Y: U: V =
Assuming that the ratio is 4: 1: 1, the data of one pixel includes Y,
Since one piece of data is required for each of U and V, the sum of the data amount of one pixel is U and V, which are 1 /, where Y is 1, and 1 + 1/4 + / =
The data amount is 1.5.

【0044】したがって、16画素のYに対するDC値
が8ビットであることに加え、U、Vも考慮したデータ
量の合計は、12ビットになる。これを1画素当たりの
データ量に換算すると、12/16=0.75ビットに
なる。
Therefore, in addition to the DC value for Y of 16 pixels being 8 bits, the total data amount considering U and V is 12 bits. If this is converted into the data amount per pixel, it becomes 12/16 = 0.75 bits.

【0045】さらに、DC値の符号化のためのDPCM
とハフマン符号化によるデータ圧縮では、4分の1のデ
ータ量の場合、0.8倍のデータ量の場合のように画像
によってばらつきがあるものの、多数の画像データに対
する実験結果によれば、平均すれば約半分のデータ量に
削減できることが判明している。
Further, a DPCM for encoding a DC value
According to the data compression by Huffman coding, although there is a variation depending on the image when the data amount is 1/4 and the data amount is 0.8 times as large, according to the experimental results for a large number of image data, It has been found that the data volume can be reduced to about half if it were done.

【0046】したがって、上述した1画素当たりの換算
されたDC値のデータ量に、DPCM及びハフマン符号
化による圧縮を行うと、平均で、0.75×0.5=
0.375の約0.4ビットの符号量に減少する。
Therefore, when the data amount of the converted DC value per pixel described above is compressed by DPCM and Huffman coding, the average is 0.75 × 0.5 =
The code amount of 0.375 is reduced to about 0.4 bits.

【0047】一方、国際公開番号WO00/02393
号の技術において、1画素当たりの符号量を調べると、
AC値を符号化した符号量が0.4ビットの場合に、D
C値を符号化した符号量も0.4ビット程度になること
が判明している。
On the other hand, International Publication Number WO00 / 02393
When examining the code amount per pixel,
When the code amount obtained by encoding the AC value is 0.4 bits, D
It has been found that the code amount obtained by coding the C value is also about 0.4 bits.

【0048】しかしながら、圧縮性能を向上させるた
め、目標の画品質を下げてAC値の符号量を0.2ビッ
トに削減したとしても、DC値の符号量が0.4ビット
のままなので全体の圧縮性能は2倍までは向上せず、
1.3倍程度に留まってしまう。仮にAC値の符号量が
0ビットになって、はじめて全体の圧縮性能が2倍にな
る。
However, even if the code amount of the AC value is reduced to 0.2 bits by lowering the target image quality in order to improve the compression performance, the code amount of the DC value remains at 0.4 bits, so that the overall Compression performance does not improve up to twice,
It stays about 1.3 times. If the code amount of the AC value becomes 0 bits, the entire compression performance doubles for the first time.

【0049】つまり、従来の技術では、画品質を下げ
て、圧縮性能を向上させようとしても、AC値の符号量
の削減が図られるのみで、DC値の符号量の削減が図ら
れず、全体としての圧縮性能の向上が期待するように得
られなかった。
That is, in the prior art, even if the image quality is reduced and the compression performance is improved, only the code amount of the AC value is reduced, but the code amount of the DC value is not reduced. The improvement in compression performance as a whole could not be obtained as expected.

【0050】そこで、本発明の目的は、DC値の符号量
の削減が可能なDC値の符号化によって、DC値の圧縮
性能を向上させることができ、ひいては全体の圧縮性能
を向上させることのできる画像データ圧縮装置、画像デ
ータ圧縮方法、画像データ圧縮方法をコンピュータに実
行させるためのプログラム、及び、画像データ圧縮方法
をコンピュータに実行させるためのプログラムを記録し
たコンピュータ読み取り可能な記録媒体を提供すること
にある。
Therefore, an object of the present invention is to improve the compression performance of a DC value by encoding a DC value capable of reducing the code amount of the DC value, and thereby to improve the overall compression performance. Provided are an image data compression apparatus, an image data compression method, a program for causing a computer to execute the image data compression method, and a computer-readable recording medium that stores a program for causing a computer to execute the image data compression method. It is in.

【0051】[0051]

【課題を解決するための手段】請求項1にかかる発明
は、画像データを符号化して圧縮する画像データ圧縮装
置において、前記画像データを複数画素のブロックに分
割し、ブロックごとの画素値の平均を表すDC値からな
るDC画像を作成するDC画像作成手段と、前記DC画
像作成手段が作成したDC画像の複数のDC値の平均値
を求め、前記平均値が求められた各DC値から前記平均
値を減算し、前記減算されて得られる複数の値を要素と
するDCベクトルを作成し、前記作成されたDCベクト
ルをベクトル量子化して符号化するDCベクトル量子化
手段とを備えたものである。
According to a first aspect of the present invention, there is provided an image data compression apparatus for encoding and compressing image data, wherein the image data is divided into a plurality of pixel blocks, and an average of pixel values of each block is obtained. DC image creating means for creating a DC image composed of DC values representing the DC value, and an average value of a plurality of DC values of the DC image created by the DC image creating means is determined. From the DC values for which the average value is determined, DC vector quantization means for subtracting an average value, creating a DC vector having a plurality of values obtained by the subtraction as elements, and vector-quantizing and encoding the created DC vector. is there.

【0052】したがって、画像データを複数画素のブロ
ックに分割した場合のブロックごとの画素値の平均を表
すDC値を符号化するために、従来のようなハフマン符
号化等を用いずに、複数のDC値の平均値を求め、平均
値が求められた各DC値から平均値を減算し、減算され
て得られる複数の値を要素とするDCベクトルを作成
し、作成されたDCベクトルをベクトル量子化して符号
化する。また、ハフマン符号化は、ビット単位の処理で
あり、一般のCPUでは演算負荷が重い処理であるもの
の、符号量を約半分に削減できることから、JPEG等
の画像データのDC値の符号化において用いられていた
が、本発明では演算処理時間がかかるハフマン符号化処
理を使う必要がない。
Therefore, in order to encode a DC value representing the average of the pixel values for each block when the image data is divided into blocks of a plurality of pixels, a plurality of blocks are used instead of the conventional Huffman coding or the like. The average value of the DC values is obtained, the average value is subtracted from each of the DC values for which the average value is obtained, a DC vector having a plurality of values obtained by the subtraction as elements is created, and the created DC vector is vector-quantized. And encode it. Huffman coding is a bit-by-bit process, and although it is a process with a heavy computational load in a general CPU, it can reduce the code amount by about half, so it is used in coding of DC values of image data such as JPEG. However, according to the present invention, it is not necessary to use the Huffman coding process that requires a long processing time.

【0053】請求項2にかかる発明は、請求項1におい
て、前記平均値が求められるために必要なDC値の数
が、前記DCベクトルの要素数の2倍以上の整数倍であ
ることを特徴とするものである。
According to a second aspect of the present invention, in the first aspect, the number of DC values required for obtaining the average value is an integer multiple of twice or more the number of elements of the DC vector. It is assumed that.

【0054】したがって、DCベクトルを作成するため
に、平均値分離型ブロック符号化法における平均値とし
て、DCベクトルの要素数の2倍以上の整数倍のDC値
の数が必要とされる。そして、このような平均値は、D
C値の値の変動に比べてさらに変動が小さい。特に、上
記整数倍の値が大きければ大きいほど、DCベクトルの
符号化に使われる平均値が多くのDCベクトル(DCベ
クトル要素)に共通して利用される。
Therefore, in order to generate a DC vector, the number of DC values that is an integer multiple of twice or more the number of elements of the DC vector is required as an average value in the mean value separation type block coding method. And such an average is D
The variation is smaller than the variation of the C value. In particular, the larger the value of the integral multiple is, the more the average value used for encoding the DC vector is commonly used for many DC vectors (DC vector elements).

【0055】請求項3にかかる発明は、請求項1又は2
において、前記DCベクトル量子化手段が、前記DCベ
クトルを作成するDCベクトル作成部と、前記DCベク
トル作成部が作成したDCベクトルを符号化するための
ベクトルの集合であるDC用辞書を保持するDC用辞書
保持部と、前記DCベクトル作成部が作成したDCベク
トルとの間の誤差が許容値以内のベクトルを、前記DC
用辞書保持部が保持したDC用辞書の中のベクトルから
検索し、前記DCベクトルを符号化するDCベクトル符
号手段とを備えたものである。
The invention according to claim 3 is the invention according to claim 1 or 2
Wherein the DC vector quantization means includes a DC vector creating unit for creating the DC vector, and a DC dictionary holding a DC dictionary which is a set of vectors for encoding the DC vector created by the DC vector creating unit. The vector between which the error between the dictionary holding unit for use and the DC vector created by the DC vector creation unit is within an allowable value
And a DC vector encoding means for retrieving from a vector in the DC dictionary held by the dictionary holding unit and encoding the DC vector.

【0056】したがって、DCベクトルとの誤差が許容
値以内のベクトルが、DC用辞書の中のベクトルから検
索され、DC値が少なくとも検索されたベクトルを特定
するDC用ベクトル番号によって符号化される。
Therefore, a vector whose error from the DC vector is within an allowable value is searched from the vector in the DC dictionary, and the DC value is encoded by at least the DC vector number specifying the searched vector.

【0057】請求項4にかかる発明は、請求項3におい
て、前記DCベクトル符号手段が、前記DCベクトル作
成部が作成したDCベクトルとの間の誤差が許容値以内
のベクトルを、前記DC用辞書保持部が保持したDC用
辞書の中のベクトルに乗数係数を乗算して検索し、前記
DC用辞書であるベクトルの集合の各ベクトルを特定す
るDC用ベクトル番号及び前記DC用ベクトル番号に対
応する乗数係数により、前記DCベクトルを符号化する
ものである。
According to a fourth aspect of the present invention, the DC vector encoding means according to the third aspect, wherein the DC vector encoding means converts the vector having an error within a tolerance from the DC vector created by the DC vector creating section into the DC dictionary. The vector in the DC dictionary held by the holding unit is searched by multiplying the vector by a multiplier coefficient, and the vector corresponding to the DC vector number and the DC vector number for specifying each vector of the vector set as the DC dictionary. The DC vector is encoded by a multiplier coefficient.

【0058】したがって、DC値が、検索されたベクト
ルを特定するDC用ベクトル番号に加え、近似精度の向
上と辞書のベクトル数の削減が可能な対応する乗数係数
により、符号化される。
Therefore, the DC value is encoded by the corresponding multiplier coefficient which can improve the approximation accuracy and reduce the number of dictionary vectors, in addition to the DC vector number specifying the searched vector.

【0059】請求項5にかかる発明は、請求項4におい
て、前記DC用ベクトル番号及び前記DC用ベクトル番
号に対応する乗数係数並びに前記平均値を前記画像デー
タのDC値の符号として出力する出力手段を備えたもの
である。
According to a fifth aspect of the present invention, in the fourth aspect, the output means for outputting the DC vector number, a multiplier coefficient corresponding to the DC vector number, and the average value as a sign of a DC value of the image data. It is provided with.

【0060】したがって、画像データを圧縮するDC値
の符号として、DC用ベクトル番号及びDC用ベクトル
番号に対応する乗数係数並びに上記平均値が出力され、
出力された符号を復号することができる。
Therefore, as a code of a DC value for compressing image data, a DC vector number, a multiplier coefficient corresponding to the DC vector number, and the average value are output.
The output code can be decoded.

【0061】請求項6にかかる発明は、請求項1から5
のいずれかにおいて、前記画像データの各画素値から前
記DC値を減算し、前記減算されて得られた複数の値を
要素とするACベクトルを作成し、前記作成されたAC
ベクトルをベクトル量子化して符号化するACベクトル
量子化手段を備えたものである。
The invention according to claim 6 is the invention according to claims 1 to 5
In any one of the above, the DC value is subtracted from each pixel value of the image data, and an AC vector having a plurality of values obtained by the subtraction as elements is created.
It is provided with an AC vector quantization means for vector-quantizing and encoding a vector.

【0062】したがって、DC値のみならず、ベクトル
量子化によってAC値の符号化も行われ、画像データに
対してDC値及びAC値の統一した符号化が行われる。
Therefore, not only the DC value but also the AC value is encoded by vector quantization, and the unified encoding of the DC value and the AC value is performed on the image data.

【0063】請求項7にかかる発明は、請求項6におい
て、前記DCベクトル量子化手段が符号化したDCベク
トルを復号するDCベクトル復号手段と、前記DCベク
トル復号手段が復号したDCベクトルからDC画像を復
号するDC画像復号手段とを備え、前記ACベクトル量
子化手段が、前記DC画像復号手段が復号したDC画像
のDC値を前記DC値として用いることを特徴とするも
のである。
According to a seventh aspect of the present invention, in the sixth aspect, a DC vector decoding means for decoding the DC vector encoded by the DC vector quantization means, and a DC image from the DC vector decoded by the DC vector decoding means. DC image decoding means for decoding the DC image, wherein the AC vector quantization means uses the DC value of the DC image decoded by the DC image decoding means as the DC value.

【0064】したがって、ACベクトルを作成するに際
して、元画像の画像データから作成したDC画像ではな
く、DCベクトルから復号したDC画像のDC値を用い
てACベクトルを作成するので、復号した際の画像を元
画像に可能な限り正確に復号することを考慮をしたAC
ベクトルの符号化を行える。
Therefore, when the AC vector is created, the AC vector is created using the DC value of the DC image decoded from the DC vector instead of the DC image created from the image data of the original image. AC that takes into account decoding the original image as accurately as possible
Vector encoding can be performed.

【0065】請求項8にかかる発明は、請求項6又は7
において、前記ACベクトル量子化手段が、前記ACベ
クトルを作成するACベクトル作成手段と、前記ACベ
クトル作成手段が作成したACベクトルを符号化するた
めのベクトルの集合であるAC用辞書を保持するAC用
辞書保持部と、前記ACベクトル作成部が作成したAC
ベクトルとの間の誤差が許容値以内のベクトルを、前記
AC用辞書保持部が保持したAC用辞書の中のベクトル
から検索し、前記ACベクトルを符号化するACベクト
ル符号手段とを備えたものである。
The invention according to claim 8 is the invention according to claim 6 or 7
In the above, the AC vector quantizing means includes an AC vector creating means for creating the AC vector and an AC dictionary holding an AC dictionary which is a set of vectors for encoding the AC vector created by the AC vector creating means. Dictionary holding unit, and the AC created by the AC vector creating unit.
AC vector coding means for searching a vector in the AC dictionary held by the AC dictionary holding unit for a vector whose error between the vector and the vector is within an allowable value, and coding the AC vector. It is.

【0066】したがって、ACベクトルとの誤差が許容
値以内のベクトルが、AC用辞書の中のベクトルから検
索され、AC値(ACベクトル)が少なくとも検索され
たベクトルを特定するAC用ベクトル番号によって符号
化される。
Therefore, a vector whose error from the AC vector is within an allowable value is searched from the vector in the AC dictionary, and the AC value (AC vector) is at least identified by the AC vector number specifying the searched vector. Be transformed into

【0067】請求項9にかかる発明は、請求項8におい
て、前記ACベクトル符号手段が、前記ACベクトル作
成部が作成したACベクトルとの間の誤差が許容値以内
のベクトルを、前記AC用辞書保持部が保持したAC用
辞書の中のベクトルに乗数係数を乗算して検索し、前記
AC用辞書であるベクトルの集合の各ベクトルを特定す
るAC用ベクトル番号及び前記AC用ベクトル番号に対
応する乗数係数により、前記ACベクトルを符号化する
ものである。
According to a ninth aspect of the present invention, in the ninth aspect of the present invention, the AC vector encoding means according to claim 8, wherein the vector having an error between the AC vector generated by the AC vector generating unit and the AC vector is within an allowable value. The vector in the AC dictionary held by the holding unit is searched by multiplying the vector by a multiplier coefficient, and the vector corresponding to the AC vector number and the AC vector number for specifying each vector of the set of vectors that are the AC dictionary. The AC vector is encoded by a multiplier coefficient.

【0068】したがって、AC値が、検索されたベクト
ルを特定するAC用ベクトル番号に加え、近似精度の向
上と辞書のベクトル数の削減が可能な対応する乗数係数
により、符号化される。
Therefore, the AC value is encoded by the corresponding multiplier coefficient that can improve the approximation accuracy and reduce the number of dictionary vectors, in addition to the AC vector number that specifies the searched vector.

【0069】請求項10にかかる発明は、請求項9にお
いて、前記AC用ベクトル番号及び前記AC用ベクトル
番号に対応する乗数係数並びに前記DC値を前記画像デ
ータの符号として出力する出力手段を備えたものであ
る。
According to a tenth aspect of the present invention, in the ninth aspect, output means for outputting the AC vector number, a multiplier coefficient corresponding to the AC vector number, and the DC value as a code of the image data. Things.

【0070】したがって、画像データを圧縮するAC値
の符号として、AC用ベクトル番号及びAC用ベクトル
番号に対応する乗数係数並びにDC値が出力され、出力
された符号を復号できる。
Therefore, as the AC value code for compressing the image data, the AC vector number, the multiplier coefficient corresponding to the AC vector number, and the DC value are output, and the output code can be decoded.

【0071】請求項11にかかる発明は、画像データを
符号化して圧縮する画像データ圧縮方法において、前記
画像データを複数画素のブロックに分割し、ブロックご
との画素値の平均を表すDC値からなるDC画像を作成
する第1のステップと、前記第1のステップにおいて作
成されたDC画像の複数のDC値の平均値を求め、前記
平均値が求められた各DC値から前記平均値を減算し、
前記減算されて得られた複数の値を要素とするDCベク
トルを作成し、前記作成されたDCベクトルをベクトル
量子化して符号化する第2のステップと、前記画像デー
タの各画素値から前記DC値を減算し、前記減算されて
得られた複数の値を要素とするACベクトルを作成し、
前記作成されたACベクトルをベクトル量子化して符号
化する第3のステップとを含むものである。
According to an eleventh aspect of the present invention, in the image data compression method for encoding and compressing image data, the image data is divided into blocks of a plurality of pixels, and comprises a DC value representing an average of pixel values for each block. A first step of creating a DC image, obtaining an average value of a plurality of DC values of the DC image created in the first step, and subtracting the average value from each DC value for which the average value has been obtained. ,
A second step of creating a DC vector having a plurality of values obtained by the subtraction as elements, vector-quantizing and encoding the created DC vector, and the DC step from each pixel value of the image data. Subtracting the values, creating an AC vector having a plurality of values obtained by the subtraction as elements,
A third step of vector-quantizing and coding the generated AC vector.

【0072】したがって、画像データを複数画素のブロ
ックに分割した場合のブロックごとの画素値の平均を表
すDC値を符号化するために、従来のようなハフマン符
号化等を用いずに、複数のDC値の平均値を求め、平均
値が求められた各DC値から平均値を減算し、減算され
て得られた複数の値を要素とするDCベクトルを作成
し、作成されたDCベクトルをベクトル量子化して符号
化する。また、ハフマン符号化は、ビット単位の処理で
あり、一般のCPUでは演算負荷が重い処理であるもの
の、符号量を約半分に削減できることから、JPEG等
の画像データのDC値の符号化において用いられていた
が、本発明では演算処理時間がかかるハフマン符号化処
理を使う必要がない。
Therefore, in order to encode a DC value representing the average of the pixel values for each block when the image data is divided into blocks of a plurality of pixels, a plurality of blocks are used instead of the conventional Huffman coding or the like. The average value of the DC values is obtained, the average value is subtracted from each DC value for which the average value is obtained, a DC vector having a plurality of values obtained by the subtraction as elements is created, and the created DC vector is vector Quantize and encode. Huffman coding is a bit-by-bit process, and although it is a process with a heavy computational load in a general CPU, it can reduce the code amount by about half, so it is used in coding of DC values of image data such as JPEG. However, according to the present invention, it is not necessary to use the Huffman coding process that requires a long processing time.

【0073】また、画像データの各画素値からDC値を
減算し、減算されて得られた複数の値を要素とするAC
ベクトルを作成し、作成されたACベクトルもベクトル
量子化して符号化する。よって、DC値の符号化のみな
らず、AC値の符号化もベクトル量子化するので、統一
した符号化法で元の画像データの符号化を行える。
Further, a DC value is subtracted from each pixel value of the image data, and an AC having a plurality of values obtained by the subtraction as elements is obtained.
A vector is created, and the created AC vector is also vector-quantized and encoded. Therefore, not only the encoding of the DC value but also the encoding of the AC value is vector-quantized, so that the original image data can be encoded by the unified encoding method.

【0074】請求項12にかかる発明は、請求項11に
おいて、前記平均値が求められるために必要なDC値の
数が、前記DCベクトルの要素数の2倍以上の整数倍で
あることを特徴とするものである。
According to a twelfth aspect of the present invention, in the eleventh aspect, the number of DC values required for obtaining the average value is an integer multiple of twice or more the number of elements of the DC vector. It is assumed that.

【0075】請求項13にかかる発明は、請求項11又
は12において、前記第1のステップにおいて作成され
たDCベクトルを符号化するためのベクトルの集合であ
るDC用辞書が予め準備されており、前記第2のステッ
プは、前記第1のステップにおいて作成されたDCベク
トルとの間の誤差が許容値以内のベクトルを、前記DC
用辞書の中のベクトルから検索し、前記DCベクトルを
符号化するステップを含むものである。
According to a thirteenth aspect of the present invention, in the eleventh or twelfth aspect, a DC dictionary as a set of vectors for encoding the DC vector created in the first step is prepared in advance. In the second step, a vector whose error between the DC vector created in the first step and the DC vector is within an allowable value is converted to the DC vector.
And searching the vector in the dictionary for encoding and encoding the DC vector.

【0076】請求項14にかかる発明は、請求項13に
おいて、前記第2のステップが、前記第1のステップに
おいて作成されたDCベクトルとの間の誤差が許容値以
内のベクトルを、前記DC用辞書の中のベクトルに乗数
係数を乗算して検索し、前記DC用辞書であるベクトル
の集合の各ベクトルを特定するDC用ベクトル番号及び
前記DC用ベクトル番号に対応する乗数係数により、前
記DCベクトルを符号化するステップを含むものであ
る。
According to a fourteenth aspect of the present invention, in the thirteenth aspect, the second step uses the vector for the DC whose error between the DC vector and the DC vector created in the first step is within an allowable value. The vector in the dictionary is searched by multiplying it by a multiplier coefficient, and the DC vector is identified by a DC vector number specifying each vector of the set of vectors as the DC dictionary and a multiplier coefficient corresponding to the DC vector number. Is encoded.

【0077】請求項15にかかる発明は、請求項14に
おいて、前記DC用ベクトル番号及び前記DC用ベクト
ル番号に対応する乗数係数並びに前記平均値を前記画像
データの符号として出力する第4のステップを含むもの
である。
According to a fifteenth aspect, in the fourteenth aspect, a fourth step of outputting the DC vector number, a multiplier coefficient corresponding to the DC vector number, and the average value as a code of the image data. Including.

【0078】請求項16にかかる発明は、請求項11か
ら15のいずれかにおいて、前記第2のステップにおい
て符号化されたDCベクトルを復号する第5のステップ
と、前記第5のステップにおいて復号されたDCベクト
ルからDC画像を復号する第6のステップとを含み、前
記第3のステップは、前記第6のステップにおいて復号
されたDC画像のDC値を前記DC値として用いるステ
ップを含むものである。
According to a sixteenth aspect of the present invention, in any one of the eleventh to fifteenth aspects, the fifth step of decoding the DC vector encoded in the second step and the step of decoding the DC vector encoded in the fifth step are performed. And a sixth step of decoding a DC image from the obtained DC vector. The third step includes a step of using a DC value of the DC image decoded in the sixth step as the DC value.

【0079】したがって、請求項12の発明は請求項2
の発明の作用と同様な作用が得られ、請求項13の発明
は請求項3の発明の作用と同様な作用が得られ、請求項
14の発明は請求項4の発明の作用と同様な作用が得ら
れ、請求項15の発明は請求項5の発明の作用と同様な
作用が得られ、請求項16の発明は請求項7の発明の作
用と同様な作用が得られる。
Therefore, the invention of claim 12 is based on claim 2
The same operation as the operation of the invention of the third aspect is obtained. The invention of the thirteenth aspect obtains the same operation as the operation of the third aspect of the invention, and the invention of the fourteenth aspect has the same operation as the operation of the fourth aspect of the invention. The invention of claim 15 has the same function as the function of the invention of claim 5, and the invention of claim 16 has the function of the invention of claim 7.

【0080】請求項17にかかる発明は、請求項11か
ら16のいずれかに記載の画像データ圧縮方法をコンピ
ュータに実行させるためのプログラムである。
The invention according to claim 17 is a program for causing a computer to execute the image data compression method according to any one of claims 11 to 16.

【0081】請求項18にかかる発明は、請求項17の
プログラムを記録したコンピュータ読み取り可能な記録
媒体である。
The invention according to claim 18 is a computer-readable recording medium on which the program according to claim 17 is recorded.

【0082】[0082]

【発明の実施の形態】以下、本発明の好ましい実施の形
態を、図面に基づき説明する。図1は、本発明の実施の
形態にかかる画像データ圧縮装置の概略ブロック図であ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic block diagram of an image data compression device according to an embodiment of the present invention.

【0083】画像データ圧縮装置1は、画像データ入力
部3と、DC画像作成部5と、DCベクトル作成部7
と、DCベクトル符号部9と、DC用辞書保持部11
と、DCベクトル復号部13と、DC画像復号部15
と、ACベクトル作成部17と、AC用辞書保持部19
と、ACベクトル符号部21とを備える。DCベクトル
作成部7、DCベクトル符号部9及びDC用辞書保持部
11により、DCベクトル量子化部6が構成され、AC
ベクトル作成部17、AC用辞書保持部19及びACベ
クトル符号部21により、ACベクトル量子化部16が
構成される。
The image data compression device 1 includes an image data input unit 3, a DC image creation unit 5, and a DC vector creation unit 7.
, DC vector encoding unit 9, DC dictionary holding unit 11
, DC vector decoding unit 13 and DC image decoding unit 15
, AC vector creation unit 17, AC dictionary holding unit 19
And an AC vector encoding unit 21. A DC vector quantization unit 6 is constituted by the DC vector creation unit 7, the DC vector encoding unit 9, and the DC dictionary holding unit 11, and AC
The vector creation unit 17, the AC dictionary holding unit 19, and the AC vector encoding unit 21 constitute an AC vector quantization unit 16.

【0084】そして、画像データ圧縮装置1は、従来の
図7の画像データ圧縮装置51と異なり、特に、DCベ
クトル作成部7と、DCベクトル符号部9と、DC用辞
書保持部11とを備えて、DC値をベクトル量子化し、
DC値の符号量を削減する。
The image data compression apparatus 1 is different from the conventional image data compression apparatus 51 shown in FIG. 7 in that it includes a DC vector creation section 7, a DC vector encoding section 9, and a DC dictionary holding section 11. To vector quantize the DC value,
The code amount of the DC value is reduced.

【0085】画像データ入力部3及びDC画像作成部5
は、図7の画像データ入力部53及びDC画像作成部5
5と同様に作用し、DC画像作成部5からDC画像デー
タがDCベクトル作成部7に入力される。DCベクトル
作成部7は、DCベクトルを作成してDCベクトル符号
部9に入力する。
Image data input unit 3 and DC image creation unit 5
Are the image data input unit 53 and the DC image creation unit 5 of FIG.
5, the DC image data is input from the DC image generation unit 5 to the DC vector generation unit 7. The DC vector creation unit 7 creates a DC vector and inputs it to the DC vector encoding unit 9.

【0086】DC用辞書保持部11は、DCベクトルを
符号化するためのベクトルの集合である辞書を保持して
いる。DCベクトル符号部9は、DC用辞書保持部11
のベクトルの集合から、DCベクトルとの誤差が許容値
以内である最適なベクトルを検索し、番号及び乗数係数
によって表現したDC値符号を求め、出力部として機能
して、DC値の平均値、ベクトル番号及び乗数係数をD
C値の符号として出力する。出力されたDC値符号は、
DCベクトル復号部13に入力される。DCベクトル復
号部13は、DC値符号からDCベクトルを復号してD
C画像復号部15に入力する。
The DC dictionary holding unit 11 holds a dictionary which is a set of vectors for encoding DC vectors. The DC vector encoding unit 9 includes a DC dictionary holding unit 11
From the set of vectors, a search is made for an optimal vector whose error from the DC vector is within an allowable value, a DC value code represented by a number and a multiplier coefficient is obtained, and the output unit functions as an output unit. Vector number and multiplier coefficient are D
Output as the sign of the C value. The output DC value code is
It is input to the DC vector decoding unit 13. The DC vector decoding unit 13 decodes the DC vector from the DC value code and
It is input to the C image decoding unit 15.

【0087】DC画像復号部15は、DCベクトルから
DC画像を復号して、DC画像データをACベクトル作
成部17に入力する。ACベクトル作成部17、AC用
辞書保持部19及びACベクトル符号部21は、図7の
ACベクトル作成部69、AC用辞書保持部71及びA
Cベクトル符号部73と同様に作用するものであり、説
明を省略する。
The DC image decoding unit 15 decodes a DC image from a DC vector and inputs DC image data to an AC vector creation unit 17. The AC vector creation unit 17, the AC dictionary holding unit 19, and the AC vector encoding unit 21 correspond to the AC vector creation unit 69, the AC dictionary holding unit 71, and the A
The operation is similar to that of the C vector encoding unit 73, and the description is omitted.

【0088】図2は、図1のDC用辞書保持部で保持さ
れたDC用辞書の作成処理の概要を説明するためのフロ
ー図であり、図3は、図2のフロー図の処理をさらに詳
細に示したフロー図であり、図4は、図3のステップS
S13、SS14及びSS15の処理をさらに詳細に示
したフロー図である。
FIG. 2 is a flowchart for explaining the outline of the process of creating the DC dictionary held by the DC dictionary holding unit of FIG. 1, and FIG. 3 further shows the process of the flowchart of FIG. FIG. 4 is a flowchart showing details, and FIG.
It is the flowchart which showed the process of S13, SS14, and SS15 in more detail.

【0089】図2のステップS1において、DCベクト
ルの読み込みが行われる。具体的には、図3のステップ
SS1に示すように、平均値分離したDCベクトルが配
列Vin[num]に読み込まれる。この時、各ベクト
ルのノルムを1に正規化し、ベクトルの第1要素が負の
数の場合には、第1の要素を正の数にするために全要素
の符号を変更する。ここで、複数の画像データから収集
したDCベクトルの集合であるソースベクトルの数は、
numで表されている。
In step S1 of FIG. 2, a DC vector is read. Specifically, as shown in step SS1 of FIG. 3, the DC vector separated by the average value is read into the array Vin [num]. At this time, the norm of each vector is normalized to 1, and when the first element of the vector is a negative number, the signs of all elements are changed to make the first element a positive number. Here, the number of source vectors, which is a set of DC vectors collected from a plurality of image data, is
It is represented by num.

【0090】図5は、画像データの画素、DC値及びD
Cベクトルの関係を説明するための図であり、図5
(a)は画像データを示した図であり、図5(b)はD
C画像を示した図である。
FIG. 5 shows the pixels, DC values and D of the image data.
FIG. 5 is a diagram for explaining a relationship between C vectors.
FIG. 5A is a diagram showing image data, and FIG.
It is the figure which showed the C image.

【0091】DC値は16個の画素値の平均値で作成さ
れ、DCベクトルは例えば範囲31内の16個のDC値
によって作成される。DCベクトルは、平均値分離して
得られるが、16個の各DC値から64個のDC値の平
均値を減算して求められる。従って、1枚の画像データ
から収集されるDCベクトルの個数は、画素数を256
で除算した値になる。
The DC value is created by an average value of 16 pixel values, and the DC vector is created by, for example, 16 DC values in the range 31. The DC vector is obtained by separating the average values, and is obtained by subtracting the average value of the 64 DC values from each of the 16 DC values. Therefore, the number of DC vectors collected from one image data is 256 pixels.
Divided by.

【0092】但し、画像データはR、G、Bの色成分ご
とに記録されるものの、画像データの符号化においては
Y、U、Vという成分に変換されて利用される。そし
て、UとVについては、4データに対して1データのみ
を利用するため、合計のベクトル数は画像の画素数を2
56で除算した値に1.5を乗算した値になる。
However, although the image data is recorded for each of the R, G, and B color components, it is converted into Y, U, and V components and used in encoding the image data. For U and V, since only one data is used for four data, the total number of vectors is 2 pixels of the image.
A value obtained by multiplying the value obtained by dividing by 56 by 1.5 is obtained.

【0093】ここで、辞書を作成するときに使用する画
像データは、全てが同じ大きさとは限らないが、例えば
縦が640、横が480の画像データとすると、640
×480/256×1.5=1800個のベクトルが収
集される。但し、この発明の実際の処理は、ベクトルの
ノルムが16未満のベクトルは収集しないことにするの
で、1800個より少ない個数となる。また、例えば縦
が1600、横が1200の画像データの場合には、最
大で1600×1200/256×1.5=11250
個のベクトルが収集される。従って、縦が640、横が
480の画像を50枚と縦が1600、横が1200の
画像を50枚使用してソースベクトルを収集すると、最
大で、1800×50+11250×50=65250
0個のベクトルが収集されることになる。
Here, the image data used when creating a dictionary is not always the same size. For example, if the image data is 640 in length and 480 in width,
× 480/256 × 1.5 = 1800 vectors are collected. However, in the actual processing of the present invention, vectors having a norm of less than 16 are not collected, so that the number is less than 1800. Further, for example, in the case of image data having a height of 1600 and a width of 1200, the maximum is 1600 × 1200/256 × 1.5 = 111250.
Vectors are collected. Therefore, if source images are collected using 50 images of 640 height and 480 width and 50 images of 1600 height and 1200 width, a maximum of 1800 × 50 + 1250 × 50 = 65250
Zero vectors will be collected.

【0094】図2のステップS2及び図3のステップS
S2において、現在の辞書ベクトルに対する誤差の累計
を表すerrstがerrst=0に初期化され、辞書
のベクトル数がnに設定される。
Step S2 in FIG. 2 and step S in FIG.
In S2, errst representing the accumulated error with respect to the current dictionary vector is initialized to errst = 0, and the number of dictionary vectors is set to n.

【0095】なお、ベクトル量子化においては、作成し
た辞書に含まれるベクトルを使用して任意の画像データ
のベクトルの近似を行うため、辞書に含まれるベクトル
数をnとしたときに、n個のベクトルで多様な画像に対
する近似性能を出来るだけ高くする必要がある。したが
って、ソースベクトル数numはnの100倍程度の値
として多様なベクトルを収集してから、収集されたベク
トル全体に対する近似性能が最も高くなるようなn個の
ベクトルが選択される。
In vector quantization, a vector included in the created dictionary is used to approximate a vector of arbitrary image data. Therefore, when the number of vectors included in the dictionary is n, n vectors are included. It is necessary to make vector approximation performance for various images as high as possible. Therefore, after collecting various vectors with the number of source vectors num being about 100 times the value of n, the n vectors having the highest approximation performance to the entire collected vectors are selected.

【0096】図2のステップS3及び図3のステップS
S3において、辞書の初期化が行われる。すなわち、辞
書配列SGorg[0]からSGorg[n−1]に互
いに異なるベクトルがコピーされて、n個のベクトルの
セットが行われる。
Step S3 in FIG. 2 and step S in FIG.
In S3, the dictionary is initialized. That is, different vectors are copied from the dictionary array SGorg [0] to SGorg [n-1], and n vectors are set.

【0097】図2のステップS4において、各DCベク
トルを辞書ベクトルで近似した場合に誤差が最小となる
辞書ベクトルの番号を求め、誤差の累計を行う。この処
理は、図3のステップSS4からステップSS11まで
の処理である。
In step S4 of FIG. 2, when each DC vector is approximated by a dictionary vector, the number of the dictionary vector that minimizes the error is determined, and the errors are accumulated. This process is a process from step SS4 to step SS11 in FIG.

【0098】ステップSS4において、現在の辞書を改
善した場合の誤差の累計であるerrnewがerrn
ew=0に初期化され、配列VinのインデックスIが
I=0に初期化される。
In step SS4, errnew, which is the total error when the current dictionary is improved, is set to errn.
ew = 0, and the index I of the array Vin is initialized to I = 0.

【0099】ステップSS5において、配列SGorg
のインデックスKがK=0に初期化され、最小誤差を表
す変数erがer=1e30という非常に大きな値に初
期化され、ベクトルDに配列Vin[I]がコピーされ
る。ここで、erは、後述するステップSS8の処理に
よって、現在までで最小の誤差の値が記録され、1e3
0とは1×10^30(1×10の30乗の数値)を表
す。
In step SS5, the array SGorg
Is initialized to K = 0, the variable er representing the minimum error is initialized to a very large value of er = 1e30, and the array Vin [I] is copied to the vector D. Here, er is the smallest error value recorded up to the present time by the processing of step SS8 described later, and 1e3
0 represents 1 × 10 ^ 30 (1 × 10 to the 30th power).

【0100】ステップSS6において、ベクトルVに配
列SGorg[K]がコピーされ、ベクトルDをベクト
ルVで近似した場合の近似誤差ベクトルEを求め、ベク
トルEの2乗ノルムを最小誤差errnowに代入す
る。ここで、alpは、alp=(<D>,<V>)/
(<V>,<V>)から式変形してalp=(<D>,
<V>)としている。これは、ソースベクトルを読み込
む段階で、各ベクトルのノルムを1に正規化しており、
(<V>,<V>)=1となるためである。そして、K
=K+1として次の辞書の番号に進めておく。
In step SS6, the array SGorg [K] is copied to the vector V, an approximate error vector E obtained when the vector D is approximated by the vector V is obtained, and the square norm of the vector E is substituted for the minimum error errnow. Here, alp is alp = (<D>, <V>) /
(<V>, <V>), the expression is transformed into alp = (<D>,
<V>). This is because the norm of each vector is normalized to 1 at the stage of reading the source vector,
This is because (<V>, <V>) = 1. And K
= K + 1 and proceed to the next dictionary number.

【0101】ステップSS7において、errnowと
erの比較が行われる。errnow<erの場合には
ステップSS8に進み、errnow=erの場合には
ステップSS9に進む。
In step SS7, errnow and er are compared. If errnow <er, the process proceeds to step SS8, and if ernow = er, the process proceeds to step SS9.

【0102】ステップSS8において、er=errn
owとして最小誤差を更新し、ベクトルVin[I]が
SGorg[K−1]により誤差が最小となることを示
すために、grp[I]=K−1とする。
In step SS8, er = errn
The minimum error is updated as ow, and grp [I] = K−1 to indicate that the vector Vin [I] has the minimum error by SGorg [K−1].

【0103】ステップSS9において、Kがnより小さ
いかが判断され、K<nの場合にはステップSS6に戻
るループ処理が行われて次の辞書配列ベクトルが調べら
れ、K=nの場合にはステップSS10に進む。
In step SS9, it is determined whether K is smaller than n. If K <n, a loop process is performed to return to step SS6 to check the next dictionary array vector, and if K = n, Proceed to step SS10.

【0104】さらにステップSS7、8、9について説
明する。grp[I]は、ソースベクトルVin[I]
が辞書ベクトルのgrp[I]番目のベクトルにより最
も誤差が小さく近似されるということを示している。e
rrnowがerよりも小さな値であれば、現在の辞書
ベクトルがこれまでの中で最も誤差が小さいことになる
が、KがステップSS6において一つ進められているの
で、grp[I]=K−1とする。K<nの間は、誤差
が最小となる辞書ベクトルが探し続けられる。
Next, steps SS7, 8, and 9 will be described. grp [I] is the source vector Vin [I]
Indicates that the error is minimized by the grp [I] -th vector of the dictionary vector. e
If rrnow is smaller than er, the current dictionary vector has the smallest error so far. However, since K is advanced by one in step SS6, grp [I] = K− Let it be 1. While K <n, the dictionary vector that minimizes the error is continuously searched.

【0105】ステップSS10において、配列SGor
gの最後まで調査が終了した時点では、erには配列S
Gorgにおける近似によって誤差が最小になった値が
保存されているので、ソースベクトル全体での誤差の累
計を表す変数errnewにerが加算されて、更新が
行われる。そして、配列Vinの変数であるIがI=I
+1に更新される。
At step SS10, the array SGo
When the survey is completed up to the end of g, er contains the array S
Since the value in which the error is minimized by the approximation in Gorg is stored, er is added to a variable errnew representing the total error in the entire source vector, and updating is performed. Then, the variable I of the array Vin is I = I
It is updated to +1.

【0106】ステップSS11において、Iがnumよ
りも小さいかが判断される。I<numの場合にはステ
ップSS5に戻って次のソースベクトルが調べられる。
Iがnumに達すると、ステップSS12に進む。
In step SS11, it is determined whether I is smaller than num. If I <num, the process returns to step SS5 to check the next source vector.
When I reaches num, the process proceeds to step SS12.

【0107】図2のステップS5及び図3のステップS
S12において、全てのソースベクトルに対する調査が
終了したことになるので、eps=|errst−er
rnew|/errnewが求められる。そして、次回
の改善処理に備えて、errst=errnewとして
現在の誤差の更新が行われる。
Step S5 in FIG. 2 and step S5 in FIG.
In S12, since the investigation for all the source vectors has been completed, eps = | errst-er
rnew | / errnew is determined. Then, in preparation for the next improvement process, the current error is updated with errst = errnew.

【0108】図2のステップS6及び図3のステップS
S13において、espが0.001よりも小さい値で
あるかが判断され、esp<0.001の場合にはステ
ップSS15に進み、esp≧0.001の場合にはス
テップSS14に進む。
Step S6 in FIG. 2 and step S in FIG.
In S13, it is determined whether esp is a value smaller than 0.001. If esp <0.001, the process proceeds to step SS15, and if esp ≧ 0.001, the process proceeds to step SS14.

【0109】まず、本来、errst=errnewと
なった場合には、これ以上の改善が出来ないことが示さ
れているので、辞書の改善処理が打ち切られるタイミン
グである。ところが、この段階まで辞書の改善処理を継
続することは、非常に時間がかかるので、辞書の改善処
理を高速化するために、eps=|errst−err
nnew|/errnewとして誤差の変化率を求め、
esp<0.001を満足した段階で辞書の改善を打ち
切っている。
First, when errst = errornew, it is indicated that no further improvement is possible, so it is time to terminate the dictionary improvement processing. However, continuing the dictionary improvement processing to this stage takes a very long time, and thus, in order to speed up the dictionary improvement processing, eps = | errst-err
The change rate of the error is calculated as nnew | / errnew,
At the stage where esp <0.001 is satisfied, the dictionary is discontinued.

【0110】なお、0.001という値は、非常に誤差
の変化率が小さいことを表しているが、これに限定され
るものではなく、0.01、0.0001のように他の
数値に設定してもよく、数値が大きくなる程、辞書の改
善処理は短時間で終了する。
Note that the value of 0.001 indicates that the rate of change of the error is extremely small, but is not limited to this, and other values such as 0.01 and 0.0001 can be used. The dictionary improvement processing may be completed in a shorter time as the numerical value increases.

【0111】図2のステップS7及び図3のステップS
S14において、0からn−1の辞書のベクトル番号を
表すMに対して、各DCベクトルで誤差が最小となる辞
書ベクトルの番号がMとなるベクトルを加算し、すなわ
ちgrp[L]=MであるベクトルVin[L]を累計
し、そのベクトルのノルムを1に正規化する。そして、
新しいSGorg[M]として、辞書ベクトルの更新を
行う。
Step S7 in FIG. 2 and step S in FIG.
In S14, a vector in which the number of the dictionary vector with the minimum error in each DC vector is M is added to M representing the vector number of the dictionary from 0 to n−1, that is, grp [L] = M A certain vector Vin [L] is accumulated, and the norm of the vector is normalized to 1. And
The dictionary vector is updated as a new SGorg [M].

【0112】図2のステップS8及び図3のステップS
S15において、0からn−1の辞書ベクトル番号を表
すMに対して、辞書ベクトルSGorg[M]のノルム
を100に正規化して整数化する。
Step S8 in FIG. 2 and step S in FIG.
In S15, the norm of the dictionary vector SGorg [M] is normalized to 100 for M representing the dictionary vector number from 0 to n−1, and is converted to an integer.

【0113】図4を用いて、図2のステップS6及び図
3のステップSS13以降の処理をさらに説明する。
The processing after step S6 in FIG. 2 and step SS13 in FIG. 3 will be further described with reference to FIG.

【0114】ステップSS141において、辞書番号M
がM=0に初期化される。ステップSS142におい
て、ベクトルvがv=0に初期化される。ステップSS
143において、ソースベクトル番号LがL=0に初期
化される。
In step SS141, dictionary number M
Are initialized to M = 0. In step SS142, the vector v is initialized to v = 0. Step SS
At 143, the source vector number L is initialized to L = 0.

【0115】ステップSS144において、grp
[L]=Mかどうかが判断される。grp[L]=Mの
場合にはステップSS145に進み、ステップSS14
5においてベクトル累計を計算すべく、vにVin
[L]を加算してv=v+Vin[L]とした後、ステ
ップSS146に進むが、grp[L]≠Mの場合には
ベクトルvについての処理は特に行わずにステップSS
146に進む。ステップSS146において、ソースベ
クトル番号LがL=L+1に更新される。
In step SS144, grp
It is determined whether [L] = M. If grp [L] = M, the process proceeds to step SS145, and the process proceeds to step SS14.
In order to calculate the vector sum at step 5, v is Vin
After adding [L] to make v = v + Vin [L], the process proceeds to step SS146. If grp [L] ≠ M, the processing for vector v is not performed and step SS146 is not performed.
Proceed to 146. In step SS146, the source vector number L is updated to L = L + 1.

【0116】ステップSS147において、Lがnum
よりも小さいかが判断される。L<numの場合にはス
テップSS144に戻り、L=numの場合にはステッ
プSS148に進む。
In step SS147, L is num
It is determined whether it is smaller than. If L <num, the process returns to step SS144. If L = num, the process proceeds to step SS148.

【0117】ステップSS148において、v=v/|
v|よってベクトルvのノルムを1に正規化し、SGo
rg[M]=vによって正規化されたベクトルによる辞
書の更新を行い、M=M+1によって辞書の番号を次に
進める。
In step SS148, v = v / |
v | to normalize the norm of the vector v to 1, SGo
The dictionary is updated with the vector normalized by rg [M] = v, and the dictionary number is advanced to the next by M = M + 1.

【0118】ステップSS149において、M<nか否
かが判断され、M<nの場合にはステップSS142に
戻り、M=nの場合には辞書の更新処理を終了し、図2
のステップS4及び図3のステップSS4に戻る。これ
により、図2のステップS7及び図3のステップSS1
4の処理が終了する。
In step SS149, it is determined whether or not M <n. If M <n, the process returns to step SS142. If M = n, the dictionary update processing is terminated.
The process returns to step S4 of FIG. Thereby, step S7 of FIG. 2 and step SS1 of FIG.
4 is completed.

【0119】図4のステップSS151において、辞書
番号MがM=0に初期化される。ステップSS152に
おいて、ベクトルvにSGorg[M]がコピーされ、
v=100×v/|v|によってノルムが100に正規
化され、v=(int)vによりベクトル要素が整数化
され、SGorg[M]=vという辞書ベクトルの更新
が行われる。
In step SS151 in FIG. 4, the dictionary number M is initialized to M = 0. In step SS152, SGorg [M] is copied to the vector v,
The norm is normalized to 100 by v = 100 × v / | v |, the vector element is converted to an integer by v = (int) v, and the dictionary vector SGorg [M] = v is updated.

【0120】ステップSS153においてMがM=M+
1によって更新され、ステップSS154においてMが
nより小さいかが判断される。M<nの場合にはステッ
プSS152に戻り、M=nの場合には処理が終了す
る。これにより、図2のステップS8及び図3のステッ
プSS15の処理が終了する。
In step SS153, M is M = M +
1 and it is determined in step SS154 whether M is smaller than n. If M <n, the process returns to step SS152, and if M = n, the process ends. Thereby, the processing of step S8 of FIG. 2 and step SS15 of FIG. 3 ends.

【0121】ところで、後述するDCベクトルのベクト
ル量子化が行われると、ベクトルの番号と乗数係数が得
られる。そして、辞書ベクトルのノルムを100に正規
化した場合の実験結果では、乗数係数は0.01から1
0の値の範囲となることが判明した。デジベル値では、
−40から20dBの範囲になり、デジベル値のダイナ
ミックレンジは、20−(−40)=60dBとなる。
さらに、乗数係数は正の場合と負の場合があるので、正
負を表すための符号に1ビットが必要であることも判明
した。結局、DCベクトルは、ベクトルの番号、乗数係
数の符号及び乗数係数の番号により、表現されることが
判明した。
By the way, when the vector quantization of the DC vector described later is performed, the vector number and the multiplier coefficient are obtained. In the experimental result when the norm of the dictionary vector is normalized to 100, the multiplier coefficient is 0.01 to 1
It was found to be in the range of 0 values. In decibel values,
The range is from −40 to 20 dB, and the dynamic range of the decibel value is 20 − (− 40) = 60 dB.
Furthermore, since the multiplier coefficient may be positive or negative, it has been found that one bit is required for the sign to indicate positive or negative. Eventually, it was found that the DC vector is represented by the vector number, the sign of the multiplier coefficient, and the number of the multiplier coefficient.

【0122】ベクトルの番号、乗数係数の符号及び乗数
係数の番号を16ビットとする場合、辞書のベクトル数
が1024個のときには、2の10乗が1024である
ことからベクトルの番号には10ビットが必要になる。
従って、乗数係数の番号に使用できる符号量は、16ビ
ットから10ビットを引き、さらに正負を表す符号分の
1ビットを引き、5ビット分の32種類となる。60d
Bのダイナミックレンジを32等分すると、乗数係数の
間隔は60/31=1.935dBとなる。
When the vector number, the sign of the multiplier coefficient and the multiplier coefficient number are 16 bits, if the number of vectors in the dictionary is 1024, 2 to the 10th power is 1024, so the vector number is 10 bits. Is required.
Therefore, the code amount that can be used for the multiplier coefficient number is 32 types of 5 bits by subtracting 10 bits from 16 bits and further subtracting 1 bit of the sign representing the sign. 60d
When the dynamic range of B is divided into 32 equal parts, the interval of the multiplier coefficient is 60/31 = 1.935 dB.

【0123】同様に、辞書のベクトル数を512個(2
の9乗)とするときには、乗数係数の番号は、16−9
−1=6ビット分の64種類が使用可能である。60d
Bのダイナミックレンジを64等分すると、乗数係数の
間隔は60/63=0.952dBになる。
Similarly, the number of dictionary vectors is set to 512 (2
, The multiplier coefficient number is 16-9.
64 types of -1 = 6 bits can be used. 60d
When the dynamic range of B is divided into 64 equal parts, the interval of the multiplier coefficient is 60/63 = 0.954 dB.

【0124】一般式的な乗数係数を表すと、乗数係数の
番号にnビットを使用する場合には、2のn乗種類の乗
数係数が使用可能になるので、第(10)式で表され
る。
In the case of using a general multiplier coefficient, when n bits are used for the multiplier coefficient number, 2 n multiplier coefficients can be used, so that the multiplier coefficient is expressed by the following equation (10). You.

【数2】 (Equation 2)

【0125】図6は、図1の画像データ圧縮装置の動作
を説明するフローチャートである。
FIG. 6 is a flowchart for explaining the operation of the image data compression apparatus of FIG.

【0126】ステップTS1において元画像である画像
データの読み込みが行われ、ステップTS2において画
像データを正方形領域(ブロック)に分割して画像ブロ
ックごとにDC値の分離が行われる。DC値は各画像ブ
ロックごとの平均値であり、ステップTS3において、
DC画像が作成される。
At step TS1, image data as an original image is read. At step TS2, the image data is divided into square areas (blocks) to separate DC values for each image block. The DC value is an average value for each image block, and in step TS3,
A DC image is created.

【0127】ステップTS4において、64個のDC値
ごとに処理する64個についての平均値mを計算し、6
4個のDC値からmを引いた値を計算して、16個の値
からなるDCベクトルを4個作成し、それぞれをベクト
ル量子化する。
In step TS4, the average value m of the 64 DC values processed for each of the 64 DC values is calculated.
A value obtained by subtracting m from the four DC values is calculated, four DC vectors each having 16 values are created, and each of the DC vectors is subjected to vector quantization.

【0128】図5(b)を用いて、4個のDCベクトル
を作成することについて簡単に説明する。図5(b)の
DC画像25に対して範囲31の横方向と縦方向に4画
素ずつの合計16個の番号順のDC値からベクトルの要
素が求められる。横方向に4つのベクトルを取り出し、
64個のDC値に対する平均値mを計算する。4つのベ
クトルの要素のそれぞれからmを引き、平均値を分離し
たベクトルを4つ作成する。なお、平均値は8ビットで
表される。
The creation of four DC vectors will be briefly described with reference to FIG. Vector elements are obtained from the DC image 25 of FIG. 5B by a total of 16 number-ordered DC values of 4 pixels in the horizontal direction and the vertical direction of the range 31. Take four vectors in the horizontal direction,
Calculate the average value m for the 64 DC values. M is subtracted from each of the elements of the four vectors, and four vectors having the average value separated are created. Note that the average value is represented by 8 bits.

【0129】次に、平均値分離したベクトル(符号化対
象ベクトル)に対して予め準備した辞書によりベクトル
量子化を行う。DC値の値の変化が少ないことを利用し
て4つのベクトルの平均値を各ベクトルから引いて、平
均値を分離したベクトルに対してベクトル量子化を行う
ことにより、DC値の符号量の削減を図っている。
Next, vector quantization is performed on a vector (encoding target vector) separated by the average value using a dictionary prepared in advance. By reducing the change in the DC value, the average value of the four vectors is subtracted from each vector, and vector quantization is performed on the vector obtained by separating the average value, thereby reducing the code amount of the DC value. Is being planned.

【0130】符号化対象ベクトルを<DC>で表すと、
辞書ベクトル<DCV1>を用いて、<DC>は、<D
C′>=α1<DCV1>という式によって近似される。
ここで、α1は辞書ベクトル<DCV1>に対する乗数係
数であり、ベクトル<a>とベクトル<b>の内積を
(<a>,<b>)で表すと、α1=(<DC>,<D
CV1>)/(<DCV1>,<DCV1>)により決定
される値である。
If the encoding target vector is represented by <DC>,
Using the dictionary vector <DCV1>, <DC> becomes <D
C '> = α1 <DCV1>.
Here, α1 is a multiplier coefficient for the dictionary vector <DCV1>, and when the inner product of the vector <a> and the vector <b> is represented by (<a>, <b>), α1 = (<DC>, <D
CV1>) / (<DCV1>, <DCV1>).

【0131】辞書ベクトル<DCV1>による近似誤差
ベクトル<DC1>は、<DC1>=<DC>−<DC′
>=<DC>−α1<DCV1>により表される。そし
て、近似誤差errは、err=(<DC1>,<DC1
>)により表される。
The approximate error vector <DC1> based on the dictionary vector <DCV1> is expressed as <DC1> = <DC> − <DC ′
> = <DC> −α1 <DCV1>. The approximation error err is err = (<DC1>, <DC1
>).

【0132】全ての辞書ベクトルを調べて、近似誤差e
rrが最小となる辞書ベクトルの番号をNoとし、乗数
係数の符号が正ならばsign=0、負ならばsign
=1とする。乗数係数を表G[i]の番号Bに変換する
には、第(11)式で行われる。
By examining all dictionary vectors, an approximation error e
The number of the dictionary vector with the smallest rr is No, and if the sign of the multiplier coefficient is positive, sign = 0, and if negative, sign
= 1. The conversion of the multiplier coefficient into the number B in Table G [i] is performed according to Expression (11).

【0133】[0133]

【数3】 (Equation 3)

【0134】第(11)式の但書において、A=20l
og10(A)+40は、現在の変数A(乗数係数の絶
対値)を使って、Aの値を更新するという意味の式であ
る。
In the proviso of the equation (11), A = 20 l
og10 (A) +40 is an expression meaning that the value of A is updated using the current variable A (the absolute value of the multiplier coefficient).

【0135】ステップTS5において、DC値符号が出
力される。DC値に対する符号は、64個のDC値に対
して1個の平均値と4個のベクトル番号及び4個の乗数
係数という形式で出力される。
In step TS5, a DC value code is output. The code for the DC value is output in the form of one average value, four vector numbers, and four multiplier coefficients for 64 DC values.

【0136】その後は、ステップTS6においてDC値
符号を復号してDC画像が復号され、ステップTS7に
おいて画像ブロックごとにACベクトルが計算され、ス
テップTS8においてACベクトルが作成され、ステッ
プTS9においてACベクトルの量子化が行われ、ステ
ップTS10においてAC値符号が出力される。ACベ
クトルの作成は元画像ブロックの各画素値からDC値を
引いて行われ、ACベクトルの量子化はAC用の辞書が
用いられて行われる。
Thereafter, in step TS6, the DC value code is decoded to decode the DC image. In step TS7, an AC vector is calculated for each image block. In step TS8, an AC vector is created. Quantization is performed, and an AC value code is output in step TS10. The creation of the AC vector is performed by subtracting the DC value from each pixel value of the original image block, and the quantization of the AC vector is performed using an AC dictionary.

【0137】以下、従来の方法に比べて、DC値の符号
量が約4分の1に削減されることについて説明する。
A description will now be given of the fact that the code amount of the DC value is reduced to about a quarter as compared with the conventional method.

【0138】まず、64個のDC値から8ビットの平均
値が計算される。64個のDC値から平均値を引き、1
6個の値からなるDCベクトルが4つ作成され、各DC
ベクトルがベクトル量子化されて16ビットの符号に変
換される。よって、64個のDC値は、平均値(8ビッ
ト)と16×4=64ビットの合計72ビットの符号に
変換される。
First, an 8-bit average value is calculated from the 64 DC values. Subtract the average value from the 64 DC values and obtain 1
Four DC vectors consisting of six values are created, and each DC vector
The vector is vector-quantized and converted to a 16-bit code. Therefore, the 64 DC values are converted into a code of a total of 72 bits of an average value (8 bits) and 16 × 4 = 64 bits.

【0139】DC値は16画素の画像データから作成さ
れるので、64個のDC値は16×64=1024画素
の画像データに対応している。したがって、64個のD
C値から作成された符号を1画素当たりの符号量に換算
すると、(8+64)/64//16=0.07ビット
になる。Y:U:V=4:1:1で符号化を行う場合に
は、1画素当たりの符号量は1.5倍になるので、0.
07×1.5≒0.1となる。
Since the DC value is created from the image data of 16 pixels, the 64 DC values correspond to the image data of 16 × 64 = 1024 pixels. Therefore, 64 D
When the code created from the C value is converted into the code amount per pixel, (8 + 64) /64//16=0.07 bits. When encoding is performed with Y: U: V = 4: 1: 1, the code amount per pixel is 1.5 times, so that 0.
07 × 1.5 ≒ 0.1.

【0140】よって、同様の方法で求めた従来の符号量
が0.4ビットであるから、符号量が約4分の1になっ
ている。その結果、従来に比べてACベクトルの符号量
を含む全体の符号量の圧縮率も向上する。
Therefore, since the conventional code amount obtained by the same method is 0.4 bits, the code amount is about one fourth. As a result, the compression rate of the entire code amount including the code amount of the AC vector is improved as compared with the related art.

【0141】すなわち、前述したように、国際公開番号
WO00/02393号による1画素当たりの符号量を
調べると、AC値が0.4ビットの場合にはDC値も
0.4ビット程度であり、合計の符号量は0.8ビット
程度であった。AC値が0.2ビットの場合でも、DC
値は0.4ビットのままであり、合計では0.6ビット
であった。
That is, as described above, when the code amount per pixel according to International Publication No. WO 00/02393 is examined, when the AC value is 0.4 bits, the DC value is also about 0.4 bits. The total code amount was about 0.8 bits. Even if the AC value is 0.2 bits, DC
The value remained at 0.4 bits, for a total of 0.6 bits.

【0142】しかしながら、本発明の実施の形態では、
DC値が0.1ビットに削減可能なため、AC値の符号
量が0.4ビットであれば合計で0.5ビットになり、
AC値の符号量が0.2ビットの場合には合計で0.3
ビットになる。よって、全体の符号量の圧縮率も向上す
ることになる。
However, in the embodiment of the present invention,
Since the DC value can be reduced to 0.1 bits, if the code amount of the AC value is 0.4 bits, it becomes 0.5 bits in total,
When the code amount of the AC value is 0.2 bits, a total of 0.3
Become a bit. Therefore, the compression rate of the entire code amount is also improved.

【0143】また、従来は、ビット単位の処理であるた
め一般のCPUでは演算負荷が重い処理であるものの、
符号量を約半分に削減できることから、JPEG等の画
像データのDC値の符号化においても、ハフマン符号化
及び復号化を行っていた。
Conventionally, since processing is performed in units of bits, the processing load is heavy for a general CPU.
Since the code amount can be reduced to about half, Huffman coding and decoding have been performed also in coding of DC values of image data such as JPEG.

【0144】しかしながら、本発明の実施の形態では、
DC値の符号化においてハフマン符号化を不要にできる
ため、圧縮率が向上するのみならず、処理を高速化でき
ることになる。
However, in the embodiment of the present invention,
Since the Huffman coding can be omitted in the coding of the DC value, not only the compression rate is improved, but also the processing can be speeded up.

【0145】なお、上記実施の形態では、4つのDCベ
クトルに対して平均値を求めたが、例えば8個のDCベ
クトルに対して平均値を求めるようにしてもよい。
In the above embodiment, the average value is obtained for four DC vectors. However, the average value may be obtained for, for example, eight DC vectors.

【0146】また、本発明は上記した実施の形態に限定
されるものではなく、特許請求の範囲に記載した技術思
想の範囲内において種々の変更が可能なのはいうまでも
ない。
The present invention is not limited to the above-described embodiment, and it goes without saying that various changes can be made within the scope of the technical idea described in the claims.

【0147】[0147]

【発明の効果】請求項1の発明によれば、ベクトル量子
化によってDC値の符号化を行えるので、従来のハフマ
ン符号化の場合に比べて圧縮率を向上できる。しかも、
ベクトル量子化は、画品質を低下させれば圧縮率をさら
に向上させることができることから、圧縮率を重視する
という符号化を行うこともできる。また、ベクトル量子
化は、ハフマン符号化に比べて演算処理時間が必要とさ
れないので、符号化処理の高速化を図ることができる。
According to the first aspect of the present invention, since a DC value can be encoded by vector quantization, the compression ratio can be improved as compared with the conventional Huffman encoding. Moreover,
In vector quantization, if the image quality is reduced, the compression ratio can be further improved. Therefore, encoding that emphasizes the compression ratio can be performed. In addition, vector quantization does not require an arithmetic processing time as compared with Huffman coding, so that the encoding process can be speeded up.

【0148】請求項2の発明によれば、DCベクトルを
作成するのに、平均値分離型ブロック符号化法における
平均値として、DCベクトルの要素数の2倍以上の整数
倍のDC値の数が必要とされ、平均値は、画素値の値の
変動に比べて変動の小さいDC値(DCベクトル要素)
の値の変動に比べてさらに変動が小さく、上記整数倍の
値として大きな数値を設定できる。そして、設定される
上記整数倍の値が大きければ大きいほど、DCベクトル
の符号化に使われる平均値が多くのDCベクトル(DC
ベクトル要素)に共通して利用されることになり、符号
量を削減できる。
According to the second aspect of the present invention, in order to generate a DC vector, the average value in the average value separation type block coding method is the number of DC values of an integer multiple of twice or more the number of elements of the DC vector. Is required, and the average value is a DC value (DC vector element) having a small variation compared to the variation of the pixel value
The variation is even smaller than the variation of the value of, and a large numerical value can be set as a value of the integral multiple. The larger the value of the integral multiple that is set is, the larger the average value used for encoding the DC vector is.
Vector element), and the code amount can be reduced.

【0149】請求項3の発明によれば、DC値がDC用
辞書内のベクトルを特定するDC用ベクトル番号によっ
て符号化され、請求項4の発明によれば、DC値がDC
用ベクトル番号及び対応する乗数係数によって符号化さ
れ、符号量を削減して圧縮率を向上できる。
According to the third aspect of the present invention, the DC value is encoded by the DC vector number for specifying the vector in the DC dictionary.
The encoding is performed by using the vector number for use and the corresponding multiplier coefficient, and the compression rate can be improved by reducing the code amount.

【0150】請求項5の発明によれば、画像データを圧
縮するDC値の符号として、DC用ベクトル番号及びD
C用ベクトル番号に対応する乗数係数並びに平均値が出
力されるので、出力された符号を用いてDCベクトルの
復号、DC画像の復号という復号処理を行うこともでき
る。
According to the fifth aspect of the present invention, a DC vector number and a D
Since the multiplier coefficient and the average value corresponding to the C vector number are output, decoding processing such as decoding of a DC vector and decoding of a DC image can be performed using the output codes.

【0151】請求項6の発明によれば、DC値のみなら
ず、ベクトル量子化によってAC値の符号化を行え、統
一的に符号量の削減の向上を図った符号化を行える。特
に、画品質を低下させれば圧縮率が向上するベクトル量
子化による符号化なので、圧縮率を重視した符号化を行
って全体の符号量の大幅な削減を図ることもできる。
According to the sixth aspect of the present invention, not only the DC value but also the AC value can be encoded by the vector quantization, and the encoding in which the code amount can be reduced uniformly can be performed. In particular, since the encoding is performed by vector quantization, in which the compression rate is improved if the image quality is reduced, encoding with emphasis on the compression rate can be performed to greatly reduce the entire code amount.

【0152】請求項7の発明によれば、ACベクトルを
作成するに際して、元画像の画像データから作成したD
C画像ではなく、DCベクトルから復号したDC画像の
DC値を用いてACベクトルを作成するので、復号した
際の画像を元画像に可能な限り正確に復号することを考
慮をしたACベクトルの符号化を行え、DC値の復号と
AC値の復号が行われれば、元の画像を可能な限り再現
した画像を復号によって得ることができる。
According to the seventh aspect of the present invention, when the AC vector is created, the D vector created from the image data of the original image is used.
Since the AC vector is created using the DC value of the DC image decoded from the DC vector instead of the C image, the code of the AC vector in consideration of decoding the decoded image to the original image as accurately as possible is considered. If the DC value and the AC value are decoded, an image that reproduces the original image as much as possible can be obtained by decoding.

【0153】請求項8の発明によれば、AC値について
請求項3と同様の効果が得られ、請求項9の発明によれ
ば、AC値について請求項4と同様の効果が得られる。
よって、DC値及びAC値について統一的な方法のベク
トル量子化による符号化により符号量の削減を図ること
ができる。
According to the eighth aspect of the invention, the same effect as that of the third aspect is obtained for the AC value, and according to the ninth aspect, the same effect as that of the fourth aspect is obtained for the AC value.
Therefore, it is possible to reduce the code amount by encoding the DC value and the AC value by vector quantization in a unified method.

【0154】請求項10の発明によれば、画像データを
圧縮するAC値の符号として、AC用ベクトル番号及び
AC用ベクトル番号に対応する乗数係数並びにDC値が
出力されるので、出力された符号を用いてACベクトル
の復号、元画像の復号という復号処理を行うこともでき
る。
According to the tenth aspect of the present invention, an AC vector number, a multiplier coefficient corresponding to the AC vector number, and a DC value are output as codes of an AC value for compressing image data. The decoding process of decoding the AC vector and decoding the original image can also be performed by using.

【0155】請求項11、17,18の発明によれば請
求項1の発明及び請求項6の発明の効果と同様な効果が
得られ、請求項12、17、18の発明によれば請求項
2の発明の効果と同様な効果が得られ、請求項13、1
7,18の発明によれば請求項3の発明の効果と同様な
効果が得られ、請求項14、17、18の発明によれば
請求項4の発明の効果と同様な効果が得られ、請求項1
5、17、18の発明によれば請求項5の発明の効果と
同様な効果が得られ、請求項16、17、18の発明に
よれば請求項7の発明の効果と同様な効果が得られる。
According to the eleventh, seventeenth and eighteenth aspects, the same effects as those of the first and sixth aspects can be obtained, and according to the twelfth, seventeenth and eighteenth aspects. The same effect as the effect of the second invention is obtained.
According to the inventions of Claims 7 and 18, the same effect as the effect of the invention of Claim 3 is obtained, and according to the inventions of Claims 14, 17, and 18, the same effect as the effect of the invention of Claim 4 is obtained, Claim 1
According to the inventions of 5, 17, and 18, the same effect as the effect of the invention of claim 5 is obtained, and according to the invention of claims 16, 17, and 18, the same effect as the effect of the invention of claim 7 is obtained. Can be

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

【図1】本発明の実施の形態にかかる画像データ圧縮装
置の概略ブロック図である。
FIG. 1 is a schematic block diagram of an image data compression device according to an embodiment of the present invention.

【図2】DC用辞書保持部で保持されたDC用辞書の作
成処理の概要を説明するためのフロー図である。
FIG. 2 is a flowchart illustrating an outline of a process of creating a DC dictionary held by a DC dictionary holding unit.

【図3】図2のフロー図の処理をさらに詳細に示したフ
ロー図である。
FIG. 3 is a flowchart showing the processing of the flowchart of FIG. 2 in further detail;

【図4】図3のステップSS13、SS14及びSS1
5の処理をさらに詳細に示したフロー図である。
FIG. 4 shows steps SS13, SS14 and SS1 of FIG.
FIG. 14 is a flowchart showing the processing of No. 5 in further detail.

【図5】画像データの画素、DC値及びDCベクトルの
関係を説明するための図である。
FIG. 5 is a diagram for explaining a relationship among pixels, DC values, and DC vectors of image data.

【図6】図1の画像データ圧縮装置の動作を説明するフ
ローチャートである。
FIG. 6 is a flowchart illustrating an operation of the image data compression device of FIG. 1;

【図7】従来の画像データ圧縮装置の内部構成を示した
図である。
FIG. 7 is a diagram showing an internal configuration of a conventional image data compression device.

【図8】図7の画像データ圧縮装置の動作を説明するた
めのフロー図である。
FIG. 8 is a flowchart for explaining the operation of the image data compression device of FIG. 7;

【図9】ハフマン符号化を説明するためのハフマン木の
一例を示した図である。
FIG. 9 is a diagram illustrating an example of a Huffman tree for explaining Huffman coding.

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

1 画像データ圧縮装置 5 DC画像作成部 6 DCベクトル量子化部 7 DCベクトル作成部 9 DCベクトル符号部 11 DC用辞書保持部 13 DCベクトル復号部 15 DC画像復号部 16 ACベクトル量子化部 17 ACベクトル作成部 19 AC用辞書保持部 21 ACベクトル符号部 DESCRIPTION OF SYMBOLS 1 Image data compression device 5 DC image creation part 6 DC vector quantization part 7 DC vector creation part 9 DC vector encoding part 11 DC dictionary holding part 13 DC vector decoding part 15 DC image decoding part 16 AC vector quantization part 17 AC Vector creation unit 19 AC dictionary holding unit 21 AC vector encoding unit

フロントページの続き (54)【発明の名称】 画像データ圧縮装置、画像データ圧縮方法、画像データ圧縮方法をコンピュータに実行させるた めのプログラム、及び、画像データ圧縮方法をコンピュータに実行させるためのプログラムを記 録したコンピュータ読み取り可能な記録媒体(54) [Title of the Invention] Image data compression apparatus, image data compression method, program for causing computer to execute image data compression method, and program for causing computer to execute image data compression method Computer-readable recording medium that records

Claims (18)

【特許請求の範囲】[Claims] 【請求項1】 画像データを符号化して圧縮する画像デ
ータ圧縮装置において、 前記画像データを複数画素のブロックに分割し、ブロッ
クごとの画素値の平均を表すDC値からなるDC画像を
作成するDC画像作成手段と、 前記DC画像作成手段が作成したDC画像の複数のDC
値の平均値を求め、前記平均値が求められた各DC値か
ら前記平均値を減算し、前記減算されて得られる複数の
値を要素とするDCベクトルを作成し、前記作成された
DCベクトルをベクトル量子化して符号化するDCベク
トル量子化手段とを備えた、画像データ圧縮装置。
1. An image data compression apparatus for encoding and compressing image data, wherein the image data is divided into blocks of a plurality of pixels, and a DC image comprising a DC value representing an average of pixel values for each block is created. Image creating means; and a plurality of DCs of the DC image created by the DC image creating means.
Calculating an average of the values, subtracting the average from each of the DC values for which the average has been determined, creating a DC vector having a plurality of values obtained by the subtraction as elements, And a DC vector quantization means for vector-quantizing and encoding the image data.
【請求項2】 前記平均値が求められるために必要なD
C値の数は、前記DCベクトルの要素数の2倍以上の整
数倍であることを特徴とする、請求項1記載の画像デー
タ圧縮装置。
2. A D value necessary for obtaining the average value.
2. The image data compression apparatus according to claim 1, wherein the number of C values is an integer multiple of at least twice the number of elements of the DC vector.
【請求項3】 前記DCベクトル量子化手段は、 前記DCベクトルを作成するDCベクトル作成部と、 前記DCベクトル作成部が作成したDCベクトルを符号
化するためのベクトルの集合であるDC用辞書を保持す
るDC用辞書保持部と、 前記DCベクトル作成部が作成したDCベクトルとの間
の誤差が許容値以内のベクトルを、前記DC用辞書保持
部が保持したDC用辞書の中のベクトルから検索し、前
記DCベクトルを符号化するDCベクトル符号手段とを
備えた、請求項1又は2記載の画像データ圧縮装置。
3. The DC vector quantization means includes: a DC vector creation unit that creates the DC vector; and a DC dictionary that is a set of vectors for encoding the DC vector created by the DC vector creation unit. A vector in the DC dictionary held by the DC dictionary holding unit is searched for a vector in which an error between the held DC dictionary holding unit and the DC vector created by the DC vector creating unit is within an allowable value. The image data compression apparatus according to claim 1, further comprising: a DC vector encoding unit that encodes the DC vector.
【請求項4】 前記DCベクトル符号手段は、前記DC
ベクトル作成部が作成したDCベクトルとの間の誤差が
許容値以内のベクトルを、前記DC用辞書保持部が保持
したDC用辞書の中のベクトルに乗数係数を乗算して検
索し、前記DC用辞書であるベクトルの集合の各ベクト
ルを特定するDC用ベクトル番号及び前記DC用ベクト
ル番号に対応する乗数係数により、前記DCベクトルを
符号化する、請求項3記載の画像データ圧縮装置。
4. The DC vector encoding means according to claim 1, wherein
A vector in which an error between the DC vector created by the vector creation unit and the DC vector is within an allowable value is searched by multiplying a vector in the DC dictionary held by the DC dictionary holding unit by a multiplier coefficient. The image data compression device according to claim 3, wherein the DC vector is encoded by a DC vector number specifying each vector of a set of vectors as a dictionary and a multiplier coefficient corresponding to the DC vector number.
【請求項5】 前記DC用ベクトル番号及び前記DC用
ベクトル番号に対応する乗数係数並びに前記平均値を前
記画像データのDC値の符号として出力する出力手段を
備えた、請求項4記載の画像データ圧縮装置。
5. The image data according to claim 4, further comprising output means for outputting the DC vector number, a multiplier coefficient corresponding to the DC vector number, and the average value as a sign of a DC value of the image data. Compression device.
【請求項6】 前記画像データの各画素値から前記DC
値を減算し、前記減算されて得られた複数の値を要素と
するACベクトルを作成し、前記作成されたACベクト
ルをベクトル量子化して符号化するACベクトル量子化
手段を備えた、請求項1から5のいずれかに記載の画像
データ圧縮装置。
6. The method according to claim 1, wherein each of the pixel values of the image data is
An AC vector quantization means for subtracting a value, creating an AC vector having a plurality of values obtained by the subtraction as elements, and vector-quantizing and encoding the created AC vector. 6. The image data compression device according to any one of 1 to 5.
【請求項7】 前記DCベクトル量子化手段が符号化し
たDCベクトルを復号するDCベクトル復号手段と、 前記DCベクトル復号手段が復号したDCベクトルから
DC画像を復号するDC画像復号手段とを備え、 前記ACベクトル量子化手段は、前記DC画像復号手段
が復号したDC画像のDC値を前記DC値として用いる
ことを特徴とする、請求項6記載の画像データ圧縮装
置。
7. A DC vector decoding means for decoding a DC vector encoded by the DC vector quantization means, and a DC image decoding means for decoding a DC image from the DC vector decoded by the DC vector decoding means, 7. The image data compression device according to claim 6, wherein said AC vector quantization means uses a DC value of a DC image decoded by said DC image decoding means as said DC value.
【請求項8】 前記ACベクトル量子化手段は、 前記ACベクトルを作成するACベクトル作成手段と、 前記ACベクトル作成手段が作成したACベクトルを符
号化するためのベクトルの集合であるAC用辞書を保持
するAC用辞書保持部と、 前記ACベクトル作成部が作成したACベクトルとの間
の誤差が許容値以内のベクトルを、前記AC用辞書保持
部が保持したAC用辞書の中のベクトルから検索し、前
記ACベクトルを符号化するACベクトル符号手段とを
備えた、請求項6又は7記載の画像データ圧縮装置。
8. The AC vector quantization means includes: an AC vector creation means for creating the AC vector; and an AC dictionary which is a set of vectors for encoding the AC vector created by the AC vector creation means. A vector in which the error between the held AC dictionary holding unit and the AC vector created by the AC vector creating unit is within an allowable value is searched from the vector in the AC dictionary held by the AC dictionary holding unit. 8. The image data compression device according to claim 6, further comprising: an AC vector encoding unit that encodes the AC vector.
【請求項9】 前記ACベクトル符号手段は、前記AC
ベクトル作成部が作成したACベクトルとの間の誤差が
許容値以内のベクトルを、前記AC用辞書保持部が保持
したAC用辞書の中のベクトルに乗数係数を乗算して検
索し、前記AC用辞書であるベクトルの集合の各ベクト
ルを特定するAC用ベクトル番号及び前記AC用ベクト
ル番号に対応する乗数係数により、前記ACベクトルを
符号化する、請求項8記載の画像データ圧縮装置。
9. The AC vector encoding means according to claim 1, wherein
The vector in the AC dictionary held by the AC dictionary holding unit is searched for a vector whose error from the AC vector created by the vector creating unit is within an allowable value by multiplying the vector by a multiplier coefficient. 9. The image data compression device according to claim 8, wherein the AC vector is encoded using an AC vector number for specifying each vector of a set of vectors as a dictionary and a multiplier coefficient corresponding to the AC vector number.
【請求項10】 前記AC用ベクトル番号及び前記AC
用ベクトル番号に対応する乗数係数並びに前記DC値を
前記画像データの符号として出力する出力手段を備え
た、請求項9記載の画像データ圧縮装置。
10. The AC vector number and the AC vector number.
10. The image data compression device according to claim 9, further comprising an output unit that outputs a multiplier coefficient corresponding to a use vector number and the DC value as a code of the image data.
【請求項11】 画像データを符号化して圧縮する画像
データ圧縮方法において、 前記画像データを複数画素のブロックに分割し、ブロッ
クごとの画素値の平均を表すDC値からなるDC画像を
作成する第1のステップと、 前記第1のステップにおいて作成されたDC画像の複数
のDC値の平均値を求め、前記平均値が求められた各D
C値から前記平均値を減算し、前記減算されて得られた
複数の値を要素とするDCベクトルを作成し、前記作成
されたDCベクトルをベクトル量子化して符号化する第
2のステップと、 前記画像データの各画素値から前記DC値を減算し、前
記減算されて得られた複数の値を要素とするACベクト
ルを作成し、前記作成されたACベクトルをベクトル量
子化して符号化する第3のステップとを含む、画像デー
タ圧縮方法。
11. An image data compression method for encoding and compressing image data, wherein the image data is divided into blocks of a plurality of pixels, and a DC image including a DC value representing an average of pixel values for each block is created. Step 1; and calculating an average value of a plurality of DC values of the DC image created in the first step.
A second step of subtracting the average value from the C value, creating a DC vector having a plurality of values obtained by the subtraction as elements, and vector-quantizing and encoding the created DC vector; Subtracting the DC value from each pixel value of the image data, creating an AC vector having a plurality of values obtained by the subtraction as elements, and performing vector quantization and encoding on the created AC vector. 3. A method for compressing image data, comprising:
【請求項12】 前記平均値が求められるために必要な
DC値の数は、前記DCベクトルの要素数の2倍以上の
整数倍であることを特徴とする、請求項11記載の画像
データ圧縮方法。
12. The image data compression according to claim 11, wherein the number of DC values required for obtaining the average value is an integer multiple of twice or more the number of elements of the DC vector. Method.
【請求項13】 前記第1のステップにおいて作成され
たDCベクトルを符号化するためのベクトルの集合であ
るDC用辞書が予め準備されており、 前記第2のステップは、前記第1のステップにおいて作
成されたDCベクトルとの間の誤差が許容値以内のベク
トルを、前記DC用辞書の中のベクトルから検索し、前
記DCベクトルを符号化するステップを含む、請求項1
1又は12記載の画像データ圧縮方法。
13. A DC dictionary, which is a set of vectors for encoding the DC vector created in the first step, is prepared in advance, and the second step is performed in the first step. 2. The method according to claim 1, further comprising: searching a vector in the DC dictionary for a vector having an error between the generated DC vector and an allowable value, and encoding the DC vector.
13. The image data compression method according to 1 or 12.
【請求項14】 前記第2のステップは、前記第1のス
テップにおいて作成されたDCベクトルとの間の誤差が
許容値以内のベクトルを、前記DC用辞書の中のベクト
ルに乗数係数を乗算して検索し、前記DC用辞書である
ベクトルの集合の各ベクトルを特定するDC用ベクトル
番号及び前記DC用ベクトル番号に対応する乗数係数に
より、前記DCベクトルを符号化するステップを含む、
請求項13記載の画像データ圧縮方法。
14. The second step is to multiply a vector in the DC dictionary by a vector whose error between the DC vector created in the first step is within an allowable value and a multiplier coefficient by a vector coefficient in the DC dictionary. Encoding the DC vector with a DC vector number that specifies each vector of the vector set that is the DC dictionary and a multiplier coefficient corresponding to the DC vector number.
The image data compression method according to claim 13.
【請求項15】 前記DC用ベクトル番号及び前記DC
用ベクトル番号に対応する乗数係数並びに前記平均値を
前記画像データの符号として出力する第4のステップを
含む、請求項14記載の画像データ圧縮方法。
15. The DC vector number and the DC
15. The image data compression method according to claim 14, further comprising a fourth step of outputting a multiplier coefficient corresponding to a use vector number and the average value as a code of the image data.
【請求項16】 前記第2のステップにおいて符号化さ
れたDCベクトルを復号する第5のステップと、 前記第5のステップにおいて復号されたDCベクトルか
らDC画像を復号する第6のステップとを含み、 前記第3のステップは、前記第6のステップにおいて復
号されたDC画像のDC値を前記DC値として用いるス
テップを含む、請求項11から15のいずれかに記載の
画像データ圧縮方法。
16. A fifth step of decoding the DC vector encoded in the second step, and a sixth step of decoding a DC image from the DC vector decoded in the fifth step. 16. The image data compression method according to claim 11, wherein the third step includes a step of using a DC value of the DC image decoded in the sixth step as the DC value.
【請求項17】 請求項11から16のいずれかに記載
の画像データ圧縮方法をコンピュータに実行させるため
のプログラム。
17. A program for causing a computer to execute the image data compression method according to claim 11. Description:
【請求項18】 請求項17のプログラムを記録したコ
ンピュータ読み取り可能な記録媒体。
18. A computer-readable recording medium on which the program according to claim 17 is recorded.
JP2001022138A 2001-01-30 2001-01-30 Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method Pending JP2002232293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001022138A JP2002232293A (en) 2001-01-30 2001-01-30 Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001022138A JP2002232293A (en) 2001-01-30 2001-01-30 Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method

Publications (1)

Publication Number Publication Date
JP2002232293A true JP2002232293A (en) 2002-08-16

Family

ID=18887588

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001022138A Pending JP2002232293A (en) 2001-01-30 2001-01-30 Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method

Country Status (1)

Country Link
JP (1) JP2002232293A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016523056A (en) * 2013-05-14 2016-08-04 フラウンホッファー−ゲゼルシャフト ツァ フェルダールング デァ アンゲヴァンテン フォアシュンク エー.ファオ Chroma subsampling

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016523056A (en) * 2013-05-14 2016-08-04 フラウンホッファー−ゲゼルシャフト ツァ フェルダールング デァ アンゲヴァンテン フォアシュンク エー.ファオ Chroma subsampling
US9916645B2 (en) 2013-05-14 2018-03-13 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Chroma subsampling

Similar Documents

Publication Publication Date Title
CN106170921B (en) It is related to the source code and decoding method and device of the data of sign compression
JP3681386B2 (en) Pre- and post-processing for improved vector quantization
JP3978478B2 (en) Apparatus and method for performing fixed-speed block-unit image compression with estimated pixel values
JP4444969B2 (en) Multi-mode alpha image processing
US20060155531A1 (en) Transform coding system and method
JP3959039B2 (en) Image encoding device, image encoding method, image encoding program, image decoding device, image decoding method, and image decoding program
JP2006502604A (en) Image compression method for arbitrarily shaped objects
WO2000002393A1 (en) Image coding/decoding method and recorded medium on which program is recorded
RU2313174C2 (en) Adaptive method and system for transforming values of parameters into indexes of code words
JP3932244B2 (en) Image encoding / decoding method and apparatus, and recording medium recording the program
JP2002232293A (en) Device and method for compressing image data, program for computer to perform image data compressing method and computer readable recording medium recording program for computer to perform image data compressing method
JP3952116B2 (en) Image compression apparatus and method
JP2005124001A (en) Apparatus, method, and program for motion picture encoding apparatus, method and program for motion picture decoding
JP2002199401A (en) Image coder, image decoder, electronic camera, and recording medium
JP2518524B2 (en) Image data compression / decompression method
Kamal et al. Iteration free fractal compression using genetic algorithm for still colour images
Koc et al. Gradient adjusted predictor with pseudo-distance technique for lossless compression of color-mapped images
JP2003284073A (en) Method and apparatus for coding and decoding image, its program, and recording medium
JP2000201078A (en) Data compression device and method, data decompression device and method, data compression and decompression system and method, code book preparing method and recording medium
JP3977753B2 (en) Information source encoding method, information source encoding device, information source encoding program, and recording medium on which information source encoding program is recorded
JPH0621828A (en) Vector quantizing decoder
JP4462087B2 (en) Encoding apparatus and encoding method
JPH08316846A (en) Image coder, image decoder, image coding method and image decoding method
Kuroki et al. Redesigning of JPEG statistical model in the lossy mode fitting distribution of DCT coefficients
Jenny et al. A modified embedded zero-tree wavelet method for medical image compression

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040715

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040727

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041124