[go: up one dir, main page]

JPH0923429A - Animation-like picture data compression method - Google Patents

Animation-like picture data compression method

Info

Publication number
JPH0923429A
JPH0923429A JP7196095A JP19609595A JPH0923429A JP H0923429 A JPH0923429 A JP H0923429A JP 7196095 A JP7196095 A JP 7196095A JP 19609595 A JP19609595 A JP 19609595A JP H0923429 A JPH0923429 A JP H0923429A
Authority
JP
Japan
Prior art keywords
data
image data
compression
image
picture
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
JP7196095A
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 JP7196095A priority Critical patent/JPH0923429A/en
Publication of JPH0923429A publication Critical patent/JPH0923429A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Processing Or Creating Images (AREA)

Abstract

PROBLEM TO BE SOLVED: To maintain a high picture data compression rate without losing the atmosphere of an animation-like original picture by combining run length compression and DCT (discrete cosine transformation). SOLUTION: Outline data is extracted from picture data (A), and the picture data is grasped as one bit per picture element. A compression processing by run length compression is executed and outline data (DR) is made. A part except for an outline part is calculated by interpolating picture element data of respective picture elements from picture element data around picture element data of an outline (B). The picture element data is grasped as regular picture element data, and the compression processing using DCT is executed. Then, picture data is made (DT). Picture compression data (DT) generated by such procedure is made into a file with following constitution. Namely, data constitution at every frame is set to be the number (n) of the bytes of DR, data of DR and data of DG. The data is made into the file and a compressed picture file is completed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータを用いた
画像処理技術に関する。更に詳細には、アニメ調画像に
おける画像圧縮処理技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing technique using a computer. More specifically, the present invention relates to image compression processing technology for animation-like images.

【0002】[0002]

【従来の技術】画像データをコンピュータ(ゲーム機も
含む)で扱えるデータにするために、画像の電気信号を
デジタル画像データに変えてコンピュータ内部または外
部の記憶装置に保存し、必要に応じてデジタル画像デー
タを電気信号に変えて外部表示装置に出力する。電気信
号をデジタルに変える操作をAD変換といい、その逆操
作をDA変換という。
2. Description of the Related Art In order to convert image data into data which can be handled by a computer (including a game machine), electric signals of an image are converted into digital image data and stored in a storage device inside or outside the computer, and digital data is stored if necessary. The image data is converted into an electric signal and output to an external display device. The operation of converting an electric signal to digital is called AD conversion, and the reverse operation is called DA conversion.

【0003】図2は、一般のアナログ信号のデジタル化
(AD変換)と復元(DA変換)過程を示したものであ
る。アナログ信号のどの帯域の周波数を取り出すかを決
めるものが帯域制限フィルタであり、復元時にデジタル
化で失われた情報を補うフィルタが補間フィルタであ
る。また“処理”とあるのは、コンピュータによってデ
ジタルデータを加工することを表している。図2のAD
変換過程はオーディオの場合も、画像データの場合も基
本的に同じである。
FIG. 2 shows a process of digitizing (AD conversion) and restoring (DA conversion) of a general analog signal. A band limiting filter determines which frequency band of the analog signal is to be extracted, and an interpolation filter is a filter that compensates for information lost by digitization during restoration. The term "processing" means processing digital data by a computer. 2 AD
The conversion process is basically the same for audio and image data.

【0004】図3は標本化操作を示している。標本化機
構は一定時間間隔Tで開閉するスイッチであり、この結
果として単位インパルス系列i(t)が得られる。入力
信号x(t)にi(t)を乗じれば、出力信号y(t)
が得られる。このy(t)が標本化された信号である。
別の言葉に言い直せば、標本化とはアナログ信号を時間
方向に対して離散信号に変えることである。
FIG. 3 illustrates the sampling operation. The sampling mechanism is a switch that opens and closes at fixed time intervals T, and as a result, a unit impulse sequence i (t) is obtained. If the input signal x (t) is multiplied by i (t), the output signal y (t)
Is obtained. This y (t) is the sampled signal.
In other words, sampling is the conversion of an analog signal into a discrete signal in the time direction.

【0005】これを式で表せば、 y(t)=Σx(t)δ(t−nT) となる。ここでΣはn=−∞〜+∞の総和、δはt=n
Tで1、t≠nTで0を表す。
If this is expressed by an equation, y (t) = Σx (t) δ (t−nT). Here, Σ is the sum of n = −∞ to + ∞, and δ is t = n.
T represents 1, and t ≠ nT represents 0.

【0006】つぎに時間方向の離散信号を振幅方向で
見、ある値で代表させる操作を量子化という。量子化ス
テップが等間隔に目盛られている場合を直線量子化とい
い、等間隔でない場合を非直線量子化という。
Next, the operation of viewing a discrete signal in the time direction in the amplitude direction and representing it with a certain value is called quantization. The case where the quantization steps are graduated at equal intervals is called linear quantization, and the case where the quantization steps are not evenly spaced is called nonlinear quantization.

【0007】量子化を行う場合に、離散値を何ビットで
表すかによって解像度が決まってくる。かりに8ビット
で表現すれば、代表値は256通り(=28階調)とな
り、16ビットなら代表値は6万5、536通り(=2
16階調)となる。たとえば図4で示すように、標本化さ
れたアナログ信号が量子化ステップ5と6の間にあると
きは、量子化出力は5レベルとなる。最大誤差は1レベ
ル(目盛り)であるから、最大誤差(精度)Qは0.0
0152%である。
When performing quantization, the resolution is determined by how many bits the discrete value is represented. If it is expressed in 8 bits, the representative value becomes 256 (= 2 8 gradations), and if it is 16 bits, the representative value becomes 65,536 (= 2 gradations).
16 gradations). For example, as shown in FIG. 4, when the sampled analog signal is between quantization steps 5 and 6, the quantized output has 5 levels. Since the maximum error is 1 level (scale), the maximum error (accuracy) Q is 0.0
It is 0152%.

【0008】画像信号は膨大な情報量をもっている。た
とえば、NTSC信号をそのままデジタル化すると約1
00Mビット/秒の情報が必要となる。このままでは容
量540MバイトのCD−ROMを使用しても1分弱の
画像しか記憶できない。またCD−ROMは転送速度が
約1.5Mバイト/秒であるから、リアルタイムの再生
が行えない。そのために画像圧縮が必要となる。そのた
めの技術として標本化、予測符号化、変換符号化、量子
化、可変長符号化などがあり、これらの技術を組み合わ
せて用いることが多い。
The image signal has a huge amount of information. For example, if the NTSC signal is directly digitized, it will be about 1
00 Mbit / sec information is required. As it is, even if a CD-ROM having a capacity of 540 Mbytes is used, only an image of less than 1 minute can be stored. Moreover, since the transfer speed of the CD-ROM is about 1.5 Mbytes / second, real-time reproduction cannot be performed. Therefore, image compression is required. Techniques for that purpose include sampling, predictive coding, transform coding, quantization, and variable length coding, and these techniques are often used in combination.

【0009】膨大化する画像データに対応するために、
さまざまな画像圧縮技術が開発されている。MPEG、JPEG
などの国際標準化方式とIndioなどのメーカー独自の方
式がある。これらの方式間にはデータの互換性はなく、
画像圧縮率、画質、処理量も異なる。最近では、変換符
号化としての画像圧縮技術としてDCT(離散コサイン
変換)が主流となっている。
In order to deal with the enormous amount of image data,
Various image compression techniques have been developed. MPEG, JPEG
There are international standardization methods such as and manufacturer-specific methods such as Indio. There is no data compatibility between these methods,
The image compression rate, image quality, and processing amount also differ. Recently, DCT (Discrete Cosine Transform) has become the mainstream as an image compression technique for transform coding.

【0010】[0010]

【発明が解決しようとする課題】画像データの圧縮にお
いて標準的なDCTを利用した圧縮方法は画像の空間方
向の情報量削減に有効であり、画像信号を低域の変換係
数に集中させる働きをもっている。別の見方をすれば、
DCTは高い周波数を多くもった画像に対して細部(高
周波数成分)を量子化して保存することが難しいし、か
りに可変長符号化処理を行ってもデータ圧縮率を高める
ことが困難である、ということを意味している。しか
し、高周波数成分をフィルタでカットして圧縮率を高め
ようとすると原画の雰囲気が失われてしまうという問題
が生じてしまう。
A compression method using a standard DCT in the compression of image data is effective in reducing the amount of information in the spatial direction of the image, and has the function of concentrating the image signal in the low-frequency transform coefficient. There is. From another perspective,
It is difficult for the DCT to quantize and store details (high frequency components) in an image having many high frequencies, and it is difficult to increase the data compression rate even if the variable length coding process is performed. It means that. However, if the high frequency components are cut by a filter to increase the compression rate, the atmosphere of the original image is lost.

【0011】アニメ調の画像では、顔などの絵に輪郭が
細かい黒線で描かれており、この部分が高周波数成分と
なっているために、DCTを用いて画像データ圧縮を行
うと輪郭部分が鮮明に表現できないために全体の雰囲気
が失われてしまう。
In an anime-like image, a contour such as a face is drawn with a fine black line, and this portion has a high frequency component. Therefore, when image data compression is performed using DCT, the contour portion is drawn. However, the whole atmosphere is lost because it cannot be expressed clearly.

【0012】一方、アニメ調の画像データに対しては直
接ランレングス圧縮を行う方法がある。この方法を用い
れば、原画の情報が失われることなく細部まで原画を再
現できる。しかしこの方法では、圧縮率がDCTよりも
低いという問題がある。本発明の課題は、アニメ調の原
画の雰囲気が失われることなく、なおかつ高い画像デー
タ圧縮率を維持できる方法を開発することにある。
On the other hand, there is a method of directly performing run-length compression for animation-like image data. Using this method, the original image can be reproduced in detail without losing the information of the original image. However, this method has a problem that the compression rate is lower than that of DCT. An object of the present invention is to develop a method capable of maintaining a high image data compression rate without losing the atmosphere of an anime-style original image.

【0013】[0013]

【課題を解決するための手段】本発明は上記の問題を解
決するために、アニメ調画像データの高周波数成分を含
む高周波数成分画像データに対してランレングス圧縮処
理を行って第1の中間圧縮画像データを形成し、前記ア
ニメ調画像データの低周波数成分を含む低周波数成分画
像データに対して離散コサイン変換圧縮処理を行って第
2の中間圧縮画像データを形成し、前記第1の中間圧縮
画像データと前記第2の中間圧縮画像データと合成して
1フレームの圧縮画像データを形成することを特徴とす
るアニメ調画像データ圧縮方法である。
In order to solve the above problems, the present invention performs a run-length compression process on high frequency component image data containing high frequency components of animation-like image data to obtain a first intermediate value. Forming compressed image data, performing discrete cosine transform compression processing on the low frequency component image data including the low frequency component of the animation-like image data to form second intermediate compressed image data, and forming the first intermediate image data. A method for compressing animation-like image data, characterized in that compressed image data and the second intermediate compressed image data are combined to form one frame of compressed image data.

【0014】画像のアナログ信号は電気の波として現れ
る。波の振幅は輝度あるいは色調を表し、色調や濃淡の
変化は周波数として表れる。一般に多くの画像は、高周
波数成分ほど振幅が小さく、画像の線や境界線などの急
激な濃度変化のある部分の情報を担っている。アニメ調
の画像を周波数の観点で分析すると、細い線で細かく描
かれた部分が周波数が高く、濃淡の変化の少ない部分は
周波数が低いことがわかる。
The analog signal of the image appears as a wave of electricity. The amplitude of the wave represents brightness or color tone, and changes in color tone or shade appear as frequency. In general, many images have smaller amplitudes as the frequency component is higher, and carry information of a portion having a sharp density change such as a line or a boundary line of the image. An analysis of an anime-like image from the viewpoint of frequency shows that the part drawn fine with a thin line has a high frequency, and the part with little change in shading has a low frequency.

【0015】たとえば人の顔の画像を例に挙げれば、輪
郭部分は高周波数になり、顔の内部は低周波数になって
いる。一般に鼻、目、唇等の輪郭、髪の毛と顔の境とい
った個所は濃淡の変化が激しく、細い線が集中すること
から高周波数になり、頬や額などは変化の少ない部分で
あることから低周波数になる。
Taking an image of a human face as an example, the contour portion has a high frequency and the inside of the face has a low frequency. Generally, the contours of the nose, eyes, lips, etc., and the boundary between the hair and the face change drastically, and thin lines concentrate, resulting in high frequencies. Frequency.

【0016】アニメ調の画像で画質の雰囲気を維持する
ためには、輪郭部分を鮮明に表現しなければならない。
それには、上記の理由から高域の周波数をできるだけ忠
実に抽出できなければならない。そのためにはランレン
グス圧縮法を用いた画像データ圧縮法が適しているが、
従来技術でも述べたようにデータ圧縮率が悪い。
In order to maintain the image quality atmosphere in an animation-like image, it is necessary to clearly express the contour portion.
For that reason, it is necessary to be able to extract high frequency frequencies as faithfully as possible for the above reason. For that purpose, the image data compression method using the run length compression method is suitable,
As described in the related art, the data compression rate is poor.

【0017】そこで上記の問題を解決するために、本発
明ではランレングス圧縮とDCTを組み合わせる方法を
採用する。すなわち、高域通過型のフィルタを用いて抜
き出したスペクトルに対しては直接ランレングス圧縮を
行い、低域通過型のフィルタを用いて抜き出したスペク
トルに対してはDCTを行う。
In order to solve the above problems, the present invention adopts a method of combining run length compression and DCT. That is, the run-length compression is directly performed on the spectrum extracted by using the high-pass filter, and the DCT is performed on the spectrum extracted by using the low-pass filter.

【0018】上記の方法で圧縮した画像データをそれぞ
れ独自にROMあるいはCD−ROMに登録しておき、
再生して利用するときはそれぞれの圧縮画像データを重
ね合わせて元の画像に復元する。このようにすれば、圧
縮率が高く、なおかつ原画に近い画像の再生が行える。
The image data compressed by the above method is individually registered in the ROM or the CD-ROM,
When reproducing and using, each compressed image data is superimposed and restored to the original image. By doing so, it is possible to reproduce an image having a high compression rate and close to the original image.

【0019】本発明の画像データ圧縮方法の一例として
以下の手順を例にとり説明する。 (処理1)…画像データから輪郭データを抜き出す。こ
れをAとする。 (処理2)…Aの画像データは黒または白の1ビットデ
ータ、すなわち1画素データ当たり1ビットとして捉
え、これに対してランレングス圧縮による圧縮処理を行
い、輪郭データとする。これをDRとする。 (処理3)…画像データの輪郭部分以外の部分は、輪郭
の画素データの周りの画素データから各画素の画素デー
タを補間によって計算する。これをBとする。 (処理4)…Bの画像データは通常の画像データとして
捉え、これに対してはDCTを利用した圧縮処理を行っ
て、画像データとする。これをDGとする。 (処理5)…上記のDRとDGを合わせて、1フレーム
(1画面)の画像データとする。これをDTとする。
The following procedure will be described as an example of the image data compression method of the present invention. (Process 1) ... Extract the contour data from the image data. This is A. (Processing 2) ... The image data of A is regarded as black or white 1-bit data, that is, 1 bit per pixel data, and a compression process by run-length compression is applied to this to obtain contour data. This is designated as DR. (Processing 3) ... For portions other than the contour portion of the image data, pixel data of each pixel is calculated by interpolation from pixel data around the contour pixel data. This is B. (Processing 4) ... The image data of B is captured as normal image data, and a compression process using DCT is performed on the image data to obtain image data. This is DG. (Processing 5) ... The above DR and DG are combined to form one frame (one screen) of image data. This is DT.

【0020】以上の手順で生成した画像圧縮データ(D
T)を以下の構成でファイル化する。すなわち、1フレ
ームごとのデータ構成は図5に示すように a.DRのバイト数(n) b.DRのデータ c.DGのデータ とする。このデータをファイル化してROMあるいはC
D−ROMに画像データとして保管すれば、圧縮された
画像ファイルの完成である。
The image compression data (D
File T) with the following configuration. That is, the data structure for each frame is as shown in FIG. Number of DR bytes (n) b. DR data c. Use as DG data. This data is made into a file and stored in ROM or C
If the image data is stored in the D-ROM, the compressed image file is completed.

【0021】上記の1〜5の処理について補足説明をす
る。まず、処理1の輪郭の抜き出しは画像データを高周
波通過型のフィルタ(デジタルハイパスフィルタ)を通
すことによって行うことができる。フィルタによって抜
き出した輪郭データは直接、ランレングス符号化で圧縮
する(処理2)。このランレングス符号化とは、0およ
び1の連なりをそのビットの数に変える方法である。
A supplementary explanation will be given of the above-mentioned processes 1 to 5. First, the contour extraction in the process 1 can be performed by passing the image data through a high frequency pass filter (digital high pass filter). The contour data extracted by the filter is directly compressed by run-length coding (process 2). This run-length coding is a method of changing the sequence of 0s and 1s into the number of bits.

【0022】たとえば、 0000011111100111 ……(1) というデータの連なりがあったとすれば、最初の0は5
個、次の1は6個、さらに0が2個、1が3個とつなが
る。そこでランレングス符号化を用いれば、上記の画像
データは2進数で 101 110 10 11 となる。
For example, suppose there is a series of data such as 0000011111100111 (1), the first 0 is 5
Next, 1 is 6 and 0 is 2 and 1 is 3. Therefore, if run length coding is used, the above-mentioned image data becomes 101 110 10 11 in binary.

【0023】もちろんこのままデータをつなげたので
は、0と1の区切りはつけられないので、区切り記号が
必要となる。その方法はさまざまなあるが、その一例と
して0を区切り記号として使用した場合の表が図6であ
る。
Of course, if the data is connected as it is, no delimiter between 0 and 1 can be added, so a delimiter is required. There are various methods, and as an example, FIG. 6 is a table when 0 is used as a delimiter.

【0024】上記の例をこの表に当てはめれば、 0101 0110 10 11 となる。Applying the above example to this table results in 0101 0110 10 11.

【0025】途中に空白を入れてあるが、実際には 010101101011 ……(2) としてファイルに登録される。Although a blank is inserted in the middle, it is actually registered in the file as 0101011101011 (2).

【0026】数列(1)と(2)を比較すればわかるよ
うに、元データは4ビット圧縮されたことになる。実際
の輪郭データではビット0のデータが多いから、圧縮率
はもっとよい。
As can be seen by comparing the sequences (1) and (2), the original data has been compressed by 4 bits. Since there are many bit 0 data in the actual contour data, the compression rate is better.

【0027】上記のランレングス符号化による圧縮は一
例であるが、ランレングスが長くなるに従って区切り文
字の0が多くなり、圧縮率を悪くしている。そこで、よ
く使われる方法としてハフマン符号化がある。この符号
化は、出現する確率の高いランレングス数に対する符号
ほど短くするというものである。この例ではさらに圧縮
率をよくするために、ランレングス符号化にハフマン符
号化を用いる。
The above-mentioned compression by the run-length coding is an example, but the number of delimiter characters increases as the run-length becomes longer, and the compression ratio becomes worse. Therefore, Huffman coding is a commonly used method. This coding is such that the code for the run length number with a higher probability of occurrence is shortened. In this example, Huffman coding is used for run length coding in order to further improve the compression rate.

【0028】すなわち、ランレングス数の発生率をp
(i)とした場合、 p(1)≧p(2)≧p(3)≧…………≧p(N) であるとき、各p(i)に対する符号長L(i)を L(1)≦L(2)≦L(3)≦…………≦L(N) となるようにランレングス符号を割り当てる。
That is, the rate of occurrence of the run length number is p
In the case of (i), when p (1) ≧ p (2) ≧ p (3) ≧ ... ≧ p (N), the code length L (i) for each p (i) is L ( Run length codes are assigned so that 1) ≤ L (2) ≤ L (3) ≤ ... ≤ L (N).

【0029】一方、輪郭部分以外の部分(低周波数部
分)に対しては、低周波通過型のフィルタ(ローパスフ
ィルタ)を使用して低周波数部分の画像データを抜き出
す。たとえば処理3の補間を行う場合、画素の周囲8個
の画素値の平均をその画素値とする。
On the other hand, for a portion (low frequency portion) other than the contour portion, a low frequency pass type filter (low pass filter) is used to extract image data of the low frequency portion. For example, when the interpolation of the process 3 is performed, the average of eight pixel values around the pixel is set as the pixel value.

【0030】これは、数1のマトリックスを輪郭の周り
3×3の画素領域で平均化することである。
This is to average the matrix of equation 1 in a 3 × 3 pixel area around the contour.

【0031】[0031]

【数1】 [Equation 1]

【0032】すなわちこのフィルタ(これをコンボリュ
ーションフィルタという)を通すことによって、輪郭部
分が削除できる。また数1の係数をさまざまに変えるこ
とによって、ローパスフィルタの特性を変化させること
もできる。このローパスフィルタ処理を画素データに施
すことにより、補間される画素値が計算できる。
That is, the contour portion can be deleted by passing this filter (this is called a convolution filter). Further, the characteristics of the low-pass filter can be changed by changing the coefficient of Expression 1 variously. The pixel value to be interpolated can be calculated by applying the low-pass filter processing to the pixel data.

【0033】以上の方法で補間処理をした画素データに
対してDCT処理を行って量子化をし、DCTの係数に
対して量子化処理を行ってハフマン符号化を施したもの
が、処理4のDGデータである。
The pixel data subjected to the interpolation processing by the above method is subjected to DCT processing for quantization, and the DCT coefficient is subjected to quantization processing for Huffman coding. It is DG data.

【0034】なおブロックサイズM×Nの2次元離散コ
サイン変換(DCT)の係数F(u,v)は、 F(u、v)=aC(u)C(v)ΣΣf(i,k) ×cos((2i+1)πu/2M)cos((2k+1)πv/2N ) である。
The coefficient F (u, v) of the two-dimensional discrete cosine transform (DCT) of block size M × N is F (u, v) = aC (u) C (v) ΣΣf (i, k) × cos ((2i + 1) πu / 2M) cos ((2k + 1) πv / 2N).

【0035】ただし、a=2/SQRT(MN)、SQ
RTは平方根の意味、u、vはYUV方式における色差
と輝度、f(i,j)は画像データである。また係数C
(ω)はω=0で1/SQRT(2)、ω≠0で1の
値、最初のΣはi=0〜M−1の総和、あとのΣはk=
0〜N−1の総和である。
However, a = 2 / SQRT (MN), SQ
RT is a square root, u and v are color differences and brightness in the YUV system, and f (i, j) is image data. The coefficient C
(Ω) is 1 / SQRT (2) when ω = 0, a value of 1 when ω ≠ 0, the first Σ is the sum of i = 0 to M−1, and the other Σ is k =
It is the sum of 0 to N-1.

【0036】以上のようにして作成されたファイルを利
用する場合は、以下の手順(処理6〜9)で行う。 (処理6)…圧縮データDTを読み込む。 (処理7)…DTのうちDRに対してはランレングス圧
縮の方法に対するデータ伸長処理を用いて、輪郭データ
を復元する。この例ではハフマン復号化を行う。 (処理8)…DGに対してはハフマン復号化の後、逆量
子化処理を行ってから、逆離散コサイン変換(IDC
T)を行って画像データを復号する。 (処理9)…復号化された画像データに対して、輪郭デ
ータを参照しながら輪郭データの位置を黒いデータに変
更する。すなわち、これによって原画の雰囲気を保持し
た画像が再現できる。
When using the file created as described above, the following procedure (processes 6 to 9) is performed. (Process 6) ... Read the compressed data DT. (Process 7) ... For DR of DT, the contour data is restored by using the data decompression process for the run length compression method. In this example, Huffman decoding is performed. (Processing 8) ... After Huffman decoding is performed on DG, inverse quantization is performed, and then inverse discrete cosine transform (IDC) is performed.
T) is performed to decode the image data. (Processing 9) ... With respect to the decoded image data, the position of the contour data is changed to black data while referring to the contour data. That is, this makes it possible to reproduce an image that retains the atmosphere of the original image.

【0037】なおIDCTはF(u、v)の逆変換であ
るから、画像データf(j,k)は次のように求まる。
すなわち、 f(i,k)=aΣΣC(u)C(v)F(u,v) ×cos((2i+1)uπ/2M)cos((2k+1)vπ/2N ) と求まる。
Since the IDCT is the inverse transformation of F (u, v), the image data f (j, k) is obtained as follows.
That is, f (i, k) = aΣΣC (u) C (v) F (u, v) × cos ((2i + 1) uπ / 2M) cos ((2k + 1) vπ / 2N)

【0038】ただし、最初のΣはu=0〜M−1の総
和、あとのΣはv=0〜N−1の総和である。なお図1
に、以上の画像データ圧縮化および画像データ復号化の
過程を要約した流れを示す。
However, the first Σ is the sum of u = 0 to M−1, and the other Σ is the sum of v = 0 to N−1. FIG. 1
Shows a flow summarizing the process of image data compression and image data decoding described above.

【0039】[0039]

【発明の効果】本発明を用いる以前は、画像データ圧縮
率を高めるために離散コサイン変換(DCT)も用いて
いた。そのため、アニメ調の画像データに対しては輪郭
部分がぼやけて原画の雰囲気が失われてしまった。とい
って、単にランレングス符号化による画像データ圧縮で
は圧縮率が悪く、多数の画像データをROMやCD−R
OMに登録することができなかった。
Before using the present invention, the discrete cosine transform (DCT) was also used to increase the image data compression rate. As a result, the outline part of the image data of an anime tone is blurred and the original image is lost. However, the compression rate of the image data compression by the run length encoding is poor, and a large amount of image data is stored in the ROM or CD-R.
I could not register with OM.

【0040】以上の矛盾する二つの要素を解決したの
が、本発明のDCTとランレングス法を用いた画像デー
タ圧縮法である。すなわち、本発明では輪郭部分に対し
ては直接、量子化してランレングス符号化を行うのでア
ニメ調の雰囲気は失われることなく、なおかつ高いデー
タ圧縮率が保てる。したがって、ROMやCD−ROM
に多くのアニメ調の画像データが登録できるために、画
像が単調にならないゲームソフトが作れるようになっ
た。
The above two contradictory elements are solved by the image data compression method using the DCT and the run length method of the present invention. That is, in the present invention, since the contour portion is directly quantized and run-length encoded, the animation-like atmosphere is not lost and a high data compression rate can be maintained. Therefore, ROM or CD-ROM
Since a lot of animation-like image data can be registered in, it is now possible to create game software in which images are not monotonous.

【0041】本発明の実施例では、ランレングス符号化
の中でも、もっとも圧縮率が高くできるというハフマン
符号化を説明した。ハフマン符号化はフレーム(ここで
は1枚の図面)が変わればランレングス数の出現確率も
変わるために、フレームごとに出現確率を求めなければ
ならない。そのために符号化に時間が掛かる。
In the embodiment of the present invention, the Huffman coding has been described in which the compression rate can be the highest among the run-length coding. In Huffman coding, the appearance probability of the run-length number changes if the frame (here, one drawing) changes, so the appearance probability must be calculated for each frame. Therefore, encoding takes time.

【0042】しかし、ゲームソフトなどの画像データ作
成はあらかじめ1回作成しておけばよく、復元(利用
時)に時間が掛からなければ問題がないから、ハフマン
符号化は画像圧縮に対して非常に有効である。また本発
明の実施例で述べたフィルタの選び方によって輪郭の抜
き出しの仕方を自由に変えることもでき、画像の調子を
変えることも可能である。
However, image data such as game software need only be created once in advance, and there is no problem unless restoration (during use) takes time. Therefore, Huffman coding is very useful for image compression. It is valid. Further, the method of extracting the contour can be freely changed by changing the method of selecting the filter described in the embodiment of the present invention, and the tone of the image can be changed.

【0043】すなわち、本発明の基本的考え方をベース
に、このようなさまざまな他の技術と組み合わせて、よ
り変化に富んだ画像や画像圧縮率の高い圧縮データを作
成することができる効果がある。
That is, based on the basic idea of the present invention, there is an effect that an image richer in variation and compressed data with a high image compression rate can be created by combining with such various other techniques. .

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

【図1】本発明の実施例における画像データの量子化/
圧縮と伸長/復号過程を示す流れ図である。
FIG. 1 is a diagram illustrating quantization / quantization of image data according to an embodiment of the present invention.
6 is a flowchart showing a compression and decompression / decoding process.

【図2】AD変換とDA変換の過程の説明図である。FIG. 2 is an explanatory diagram of a process of AD conversion and DA conversion.

【図3】標本化の過程の説明図である。FIG. 3 is an explanatory diagram of a sampling process.

【図4】量子化におけるスケールとアナログ信号の関係
の説明図である。
FIG. 4 is an explanatory diagram of a relationship between a scale and an analog signal in quantization.

【図5】本発明の実施例における1フレーム当たりの圧
縮データの構成の説明図である。
FIG. 5 is an explanatory diagram of a configuration of compressed data per frame in the embodiment of the present invention.

【図6】本発明の実施例において、ランレングス符号化
の一つとして0区切り記号を用いた場合のランレングス
と符号長の説明図である。
FIG. 6 is an explanatory diagram of run lengths and code lengths when a 0 delimiter is used as one of run length encodings in the embodiment of the present invention.

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成7年9月1日[Submission date] September 1, 1995

【手続補正1】[Procedure amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】全文[Correction target item name] Full text

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【書類名】 明細書[Document Name] Statement

【発明の名称】 アニメ調画像データ圧縮方法[Title of Invention] Animation-like image data compression method

【特許請求の範囲】[Claims]

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータを用
いた画像処理技術に関する。更に詳細には、アニメ調画
像における画像圧縮処理技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing technique using a computer. More specifically, the present invention relates to image compression processing technology for animation-like images.

【0002】[0002]

【従来の技術】画像データをコンピュータ(ゲーム機も
含む)で扱えるデータにするために、画像の電気信号を
デジタル画像データに変えてコンピュータ内部または外
部の記憶装置に保存し、必要に応じてデジタル画像デー
タを電気信号に変えて外部表示装置に出力する。電気信
号をデジタルに変える操作をAD変換といい、その逆操
作をDA変換という。
2. Description of the Related Art In order to convert image data into data which can be handled by a computer (including a game machine), electric signals of an image are converted into digital image data and stored in a storage device inside or outside the computer, and digital data is stored if necessary. The image data is converted into an electric signal and output to an external display device. The operation of converting an electric signal to digital is called AD conversion, and the reverse operation is called DA conversion.

【0003】図2は、一般のアナログ信号のデジタル化
(AD変換)と復元(DA変換)過程を示したものであ
る。アナログ信号のどの帯域の周波数を取り出すかを決
めるものが帯域制限フィルタであり、復元時にデジタル
化で失われた情報を補うフィルタが補間フィルタであ
る。また“処理”とあるのは、コンピュータによってデ
ジタルデータを加工することを表している。図2のAD
変換過程はオーディオの場合も、画像データの場合も基
本的に同じである。
FIG. 2 shows a process of digitizing (AD conversion) and restoring (DA conversion) of a general analog signal. A band limiting filter determines which frequency band of the analog signal is to be extracted, and an interpolation filter is a filter that compensates for information lost by digitization during restoration. The term "processing" means processing digital data by a computer. 2 AD
The conversion process is basically the same for audio and image data.

【0004】図3は標本化操作を示している。標本化機
構は一定時間間隔Tで開閉するスイッチであり、この結
果として単位インパルス系列i(t)が得られる。入力
信号x(t)にi(t)を乗じれば、出力信号y(t)
が得られる。このy(t)が標本化された信号である。
別の言葉に言い直せば、標本化とはアナログ信号を時間
方向に対して離散信号に変えることである。
FIG. 3 illustrates the sampling operation. The sampling mechanism is a switch that opens and closes at fixed time intervals T, and as a result, a unit impulse sequence i (t) is obtained. If the input signal x (t) is multiplied by i (t), the output signal y (t)
Is obtained. This y (t) is the sampled signal.
In other words, sampling is the conversion of an analog signal into a discrete signal in the time direction.

【0005】これを式で表せば、 y(t)=Σx(t)δ(t−nT) となる。ここでΣはn=−∞〜+∞の総和、δはt=n
Tで1、t≠nTで0を表す。
If this is expressed by an equation, y (t) = Σx (t) δ (t−nT). Here, Σ is the sum of n = −∞ to + ∞, and δ is t = n.
T represents 1, and t ≠ nT represents 0.

【0006】つぎに時間方向の離散信号を振幅方向で
見、ある値で代表させる操作を量子化という。量子化ス
テップが等間隔に目盛られている場合を直線量子化とい
い、等間隔でない場合を非直線量子化という。
Next, the operation of viewing a discrete signal in the time direction in the amplitude direction and representing it with a certain value is called quantization. The case where the quantization steps are graduated at equal intervals is called linear quantization, and the case where the quantization steps are not evenly spaced is called nonlinear quantization.

【0007】量子化を行う場合に、離散値を何ビットで
表すかによって解像度が決まってくる。かりに8ビット
で表現すれば、代表値は256通り(=28階調)とな
り、16ビットなら代表値は6万5、536通り(=2
16階調)となる。たとえば図4で示すように、標本化さ
れたアナログ信号が量子化ステップ5と6の間にあると
きは、量子化出力は5レベルとなる。最大誤差は1レベ
ル(目盛り)であるから、最大誤差(精度)Qは0.0
0152%である。
When performing quantization, the resolution is determined by how many bits the discrete value is represented. If it is expressed in 8 bits, the representative value becomes 256 (= 2 8 gradations), and if it is 16 bits, the representative value becomes 65,536 (= 2 gradations).
16 gradations). For example, as shown in FIG. 4, when the sampled analog signal is between quantization steps 5 and 6, the quantized output has 5 levels. Since the maximum error is 1 level (scale), the maximum error (accuracy) Q is 0.0
It is 0152%.

【0008】画像信号は膨大な情報量をもっている。た
とえば、NTSC信号をそのままデジタル化すると約1
00Mビット/秒の情報が必要となる。このままでは容
量540MバイトのCD−ROMを使用しても1分弱の
画像しか記憶できない。またCD−ROMは転送速度が
約1.5Mバイト/秒であるから、リアルタイムの再生
が行えない。そのために画像圧縮が必要となる。そのた
めの技術として標本化、予測符号化、変換符号化、量子
化、可変長符号化などがあり、これらの技術を組み合わ
せて用いることが多い。
The image signal has a huge amount of information. For example, if the NTSC signal is directly digitized, it will be about 1
00 Mbit / sec information is required. As it is, even if a CD-ROM having a capacity of 540 Mbytes is used, only an image of less than 1 minute can be stored. Moreover, since the transfer speed of the CD-ROM is about 1.5 Mbytes / second, real-time reproduction cannot be performed. Therefore, image compression is required. Techniques for that purpose include sampling, predictive coding, transform coding, quantization, and variable length coding, and these techniques are often used in combination.

【0009】膨大化する画像データに対応するために、
さまざまな画像圧縮技術が開発されている。MPEG、JPEG
などの国際標準化方式とIndioなどのメーカー独自の方
式がある。これらの方式間にはデータの互換性はなく、
画像圧縮率、画質、処理量も異なる。最近では、変換符
号化としての画像圧縮技術としてDCT(離散コサイン
変換)が主流となっている。
In order to deal with the enormous amount of image data,
Various image compression techniques have been developed. MPEG, JPEG
There are international standardization methods such as and manufacturer-specific methods such as Indio. There is no data compatibility between these methods,
The image compression rate, image quality, and processing amount also differ. Recently, DCT (Discrete Cosine Transform) has become the mainstream as an image compression technique for transform coding.

【0010】[0010]

【発明が解決しようとする課題】画像データの圧縮にお
いて標準的なDCTを利用した圧縮方法は画像の空間方
向の情報量削減に有効であり、画像信号を低域の変換係
数に集中させる働きをもっている。別の見方をすれば、
DCTは高い周波数を多くもった画像に対して細部(高
周波数成分)を量子化して保存することが難しいし、か
りに可変長符号化処理を行ってもデータ圧縮率を高める
ことが困難である、ということを意味している。しか
し、高周波数成分をフィルタでカットして圧縮率を高め
ようとすると原画の雰囲気が失われてしまうという問題
が生じてしまう。
A compression method using a standard DCT in the compression of image data is effective in reducing the amount of information in the spatial direction of the image, and has the function of concentrating the image signal in the low-frequency transform coefficient. There is. From another perspective,
It is difficult for the DCT to quantize and store details (high frequency components) in an image having many high frequencies, and it is difficult to increase the data compression rate even if the variable length coding process is performed. It means that. However, if the high frequency components are cut by a filter to increase the compression rate, the atmosphere of the original image is lost.

【0011】アニメ調の画像では、顔などの絵に輪郭が
細かい黒線で描かれており、この部分が高周波数成分と
なっているために、DCTを用いて画像データ圧縮を行
うと輪郭部分が鮮明に表現できないために全体の雰囲気
が失われてしまう。
In an anime-like image, a contour such as a face is drawn with a fine black line, and this portion has a high frequency component. Therefore, when image data compression is performed using DCT, the contour portion is drawn. However, the whole atmosphere is lost because it cannot be expressed clearly.

【0012】一方、アニメ調の画像データに対しては直
接ランレングス圧縮を行う方法がある。この方法を用い
れば、原画の情報が失われることなく細部まで原画を再
現できる。しかしこの方法では、圧縮率がDCTよりも
低いという問題がある。本発明の課題は、アニメ調の原
画の雰囲気が失われることなく、なおかつ高い画像デー
タ圧縮率を維持できる方法を開発することにある。
On the other hand, there is a method of directly performing run-length compression for animation-like image data. Using this method, the original image can be reproduced in detail without losing the information of the original image. However, this method has a problem that the compression rate is lower than that of DCT. An object of the present invention is to develop a method capable of maintaining a high image data compression rate without losing the atmosphere of an anime-style original image.

【0013】[0013]

【課題を解決するための手段】本発明は上記の問題を解
決するために、アニメ調画像データの高周波数成分を含
む高周波数成分画像データに対してランレングス圧縮処
理を行って第1の中間圧縮画像データを形成し、前記ア
ニメ調画像データの低周波数成分を含む低周波数成分画
像データに対して離散コサイン変換圧縮処理を行って第
2の中間圧縮画像データを形成し、前記第1の中間圧縮
画像データと前記第2の中間圧縮画像データと合成して
1フレームの圧縮画像データを形成することを特徴とす
るアニメ調画像データ圧縮方法である。
In order to solve the above problems, the present invention performs a run-length compression process on high frequency component image data containing high frequency components of animation-like image data to obtain a first intermediate value. Forming compressed image data, performing discrete cosine transform compression processing on the low frequency component image data including the low frequency component of the animation-like image data to form second intermediate compressed image data, and forming the first intermediate image data. A method for compressing animation-like image data, characterized in that compressed image data and the second intermediate compressed image data are combined to form one frame of compressed image data.

【0014】[0014]

【発明の実施の形態】画像のアナログ信号は電気の波と
して現れる。波の振幅は輝度あるいは色調を表し、色調
や濃淡の変化は周波数として表れる。一般に多くの画像
は、高周波数成分ほど振幅が小さく、画像の線や境界線
などの急激な濃度変化のある部分の情報を担っている。
アニメ調の画像を周波数の観点で分析すると、細い線で
細かく描かれた部分が周波数が高く、濃淡の変化の少な
い部分は周波数が低いことがわかる。
DETAILED DESCRIPTION OF THE INVENTION The analog signal of an image appears as an electrical wave. The amplitude of the wave represents brightness or color tone, and changes in color tone or shade appear as frequency. In general, many images have smaller amplitudes as the frequency component is higher, and carry information of a portion having a sharp density change such as a line or a boundary line of the image.
An analysis of an anime-like image from the viewpoint of frequency shows that the part drawn fine with a thin line has a high frequency, and the part with little change in shading has a low frequency.

【0015】たとえば人の顔の画像を例に挙げれば、輪
郭部分は高周波数になり、顔の内部は低周波数になって
いる。一般に鼻、目、唇等の輪郭、髪の毛と顔の境とい
った個所は濃淡の変化が激しく、細い線が集中すること
から高周波数になり、頬や額などは変化の少ない部分で
あることから低周波数になる。
Taking an image of a human face as an example, the contour portion has a high frequency and the inside of the face has a low frequency. Generally, the contours of the nose, eyes, lips, etc., and the boundary between the hair and the face change drastically, and thin lines concentrate, resulting in high frequencies. Frequency.

【0016】アニメ調の画像で画質の雰囲気を維持する
ためには、輪郭部分を鮮明に表現しなければならない。
それには、上記の理由から高域の周波数をできるだけ忠
実に抽出できなければならない。そのためにはランレン
グス圧縮法を用いた画像データ圧縮法が適しているが、
従来技術でも述べたようにデータ圧縮率が悪い。
In order to maintain the image quality atmosphere in an animation-like image, it is necessary to clearly express the contour portion.
For that reason, it is necessary to be able to extract high frequency frequencies as faithfully as possible for the above reason. For that purpose, the image data compression method using the run length compression method is suitable,
As described in the related art, the data compression rate is poor.

【0017】そこで上記の問題を解決するために、本発
明ではランレングス圧縮とDCTを組み合わせる方法を
採用する。すなわち、高域通過型のフィルタを用いて抜
き出したスペクトルに対しては直接ランレングス圧縮を
行い、低域通過型のフィルタを用いて抜き出したスペク
トルに対してはDCTを行う。
In order to solve the above problems, the present invention adopts a method of combining run length compression and DCT. That is, the run-length compression is directly performed on the spectrum extracted by using the high-pass filter, and the DCT is performed on the spectrum extracted by using the low-pass filter.

【0018】上記の方法で圧縮した画像データをそれぞ
れ独自にROMあるいはCD−ROMに登録しておき、
再生して利用するときはそれぞれの圧縮画像データを重
ね合わせて元の画像に復元する。このようにすれば、圧
縮率が高く、なおかつ原画に近い画像の再生が行える。
The image data compressed by the above method is individually registered in the ROM or the CD-ROM,
When reproducing and using, each compressed image data is superimposed and restored to the original image. By doing so, it is possible to reproduce an image having a high compression rate and close to the original image.

【0019】[0019]

【実施例】本発明の画像データ圧縮方法の一例として以
下の手順を例にとり説明する。 (処理1)…画像データから輪郭データを抜き出す。こ
れをAとする。 (処理2)…Aの画像データは黒または白の1ビットデ
ータ、すなわち1画素データ当たり1ビットとして捉
え、これに対してランレングス圧縮による圧縮処理を行
い、輪郭データとする。これをDRとする。 (処理3)…画像データの輪郭部分以外の部分は、輪郭
の画素データの周りの画素データから各画素の画素デー
タを補間によって計算する。これをBとする。 (処理4)…Bの画像データは通常の画像データとして
捉え、これに対してはDCTを利用した圧縮処理を行っ
て、画像データとする。これをDGとする。 (処理5)…上記のDRとDGを合わせて、1フレーム
(1画面)の画像データとする。これをDTとする。
The following procedure will be described as an example of the image data compression method of the present invention. (Process 1) ... Extract the contour data from the image data. This is A. (Processing 2) ... The image data of A is regarded as black or white 1-bit data, that is, 1 bit per pixel data, and a compression process by run-length compression is applied to this to obtain contour data. This is designated as DR. (Processing 3) ... For portions other than the contour portion of the image data, pixel data of each pixel is calculated by interpolation from pixel data around the contour pixel data. This is B. (Processing 4) ... The image data of B is captured as normal image data, and a compression process using DCT is performed on the image data to obtain image data. This is DG. (Processing 5) ... The above DR and DG are combined to form one frame (one screen) of image data. This is DT.

【0020】以上の手順で生成した画像圧縮データ(D
T)を以下の構成でファイル化する。すなわち、1フレ
ームごとのデータ構成は図5に示すように a.DRのバイト数(n) b.DRのデータ c.DGのデータ とする。このデータをファイル化してROMあるいはC
D−ROMに画像データとして保管すれば、圧縮された
画像ファイルの完成である。
The image compression data (D
File T) with the following configuration. That is, the data structure for each frame is as shown in FIG. Number of DR bytes (n) b. DR data c. Use as DG data. This data is made into a file and stored in ROM or C
If the image data is stored in the D-ROM, the compressed image file is completed.

【0021】上記の1〜5の処理について補足説明をす
る。まず、処理1の輪郭の抜き出しは画像データを高周
波通過型のフィルタ(デジタルハイパスフィルタ)を通
すことによって行うことができる。フィルタによって抜
き出した輪郭データは直接、ランレングス符号化で圧縮
する(処理2)。このランレングス符号化とは、0およ
び1の連なりをそのビットの数に変える方法である。
A supplementary explanation will be given of the above-mentioned processes 1 to 5. First, the contour extraction in the process 1 can be performed by passing the image data through a high frequency pass filter (digital high pass filter). The contour data extracted by the filter is directly compressed by run-length coding (process 2). This run-length coding is a method of changing the sequence of 0s and 1s into the number of bits.

【0022】たとえば、 0000011111100111 ……(1) というデータの連なりがあったとすれば、最初の0は5
個、次の1は6個、さらに0が2個、1が3個とつなが
る。そこでランレングス符号化を用いれば、上記の画像
データは2進数で 101 110 10 11 となる。
For example, suppose there is a series of data such as 0000011111100111 (1), the first 0 is 5
Next, 1 is 6 and 0 is 2 and 1 is 3. Therefore, if run length coding is used, the above-mentioned image data becomes 101 110 10 11 in binary.

【0023】もちろんこのままデータをつなげたので
は、0と1の区切りはつけられないので、区切り記号が
必要となる。その方法はさまざまなあるが、その一例と
して0を区切り記号として使用した場合の表が図6であ
る。
Of course, if the data is connected as it is, no delimiter between 0 and 1 can be added, so a delimiter is required. There are various methods, and as an example, FIG. 6 is a table when 0 is used as a delimiter.

【0024】上記の例をこの表に当てはめれば、 0101 0110 10 11 となる。Applying the above example to this table results in 0101 0110 10 11.

【0025】途中に空白を入れてあるが、実際には 010101101011 ……(2) としてファイルに登録される。Although a blank is inserted in the middle, it is actually registered in the file as 0101011101011 (2).

【0026】数列(1)と(2)を比較すればわかるよ
うに、元データは4ビット圧縮されたことになる。実際
の輪郭データではビット0のデータが多いから、圧縮率
はもっとよい。
As can be seen by comparing the sequences (1) and (2), the original data has been compressed by 4 bits. Since there are many bit 0 data in the actual contour data, the compression rate is better.

【0027】上記のランレングス符号化による圧縮は一
例であるが、ランレングスが長くなるに従って区切り文
字の0が多くなり、圧縮率を悪くしている。そこで、よ
く使われる方法としてハフマン符号化がある。この符号
化は、出現する確率の高いランレングス数に対する符号
ほど短くするというものである。この例ではさらに圧縮
率をよくするために、ランレングス符号化にハフマン符
号化を用いる。
The above-mentioned compression by the run-length coding is an example, but the number of delimiter characters increases as the run-length becomes longer, and the compression ratio becomes worse. Therefore, Huffman coding is a commonly used method. This coding is such that the code for the run length number with a higher probability of occurrence is shortened. In this example, Huffman coding is used for run length coding in order to further improve the compression rate.

【0028】すなわち、ランレングス数の発生率をp
(i)とした場合、 p(1)≧p(2)≧p(3)≧…………≧p(N) であるとき、各p(i)に対する符号長L(i)を L(1)≦L(2)≦L(3)≦…………≦L(N) となるようにランレングス符号を割り当てる。
That is, the rate of occurrence of the run length number is p
In the case of (i), when p (1) ≧ p (2) ≧ p (3) ≧ ... ≧ p (N), the code length L (i) for each p (i) is L ( Run length codes are assigned so that 1) ≤ L (2) ≤ L (3) ≤ ... ≤ L (N).

【0029】一方、輪郭部分以外の部分(低周波数部
分)に対しては、低周波通過型のフィルタ(ローパスフ
ィルタ)を使用して低周波数部分の画像データを抜き出
す。たとえば処理3の補間を行う場合、画素の周囲8個
の画素値の平均をその画素値とする。
On the other hand, for a portion (low frequency portion) other than the contour portion, a low frequency pass type filter (low pass filter) is used to extract image data of the low frequency portion. For example, when the interpolation of the process 3 is performed, the average of eight pixel values around the pixel is set as the pixel value.

【0030】これは、数1のマトリックスを輪郭の周り
3×3の画素領域で平均化することである。
This is to average the matrix of equation 1 in a 3 × 3 pixel area around the contour.

【0031】[0031]

【数1】(Equation 1)

【0032】すなわちこのフィルタ(これをコンボリュ
ーションフィルタという)を通すことによって、輪郭部
分が削除できる。また数1の係数をさまざまに変えるこ
とによって、ローパスフィルタの特性を変化させること
もできる。このローパスフィルタ処理を画素データに施
すことにより、補間される画素値が計算できる。
That is, the contour portion can be deleted by passing this filter (this is called a convolution filter). Further, the characteristics of the low-pass filter can be changed by changing the coefficient of Expression 1 variously. The pixel value to be interpolated can be calculated by applying the low-pass filter processing to the pixel data.

【0033】以上の方法で補間処理をした画素データに
対してDCT処理を行って量子化をし、DCTの係数に
対して量子化処理を行ってハフマン符号化を施したもの
が、処理4のDGデータである。
The pixel data subjected to the interpolation processing by the above method is subjected to DCT processing for quantization, and the DCT coefficient is subjected to quantization processing for Huffman coding. It is DG data.

【0034】なおブロックサイズM×Nの2次元離散コ
サイン変換(DCT)の係数F(u,v)は、 F(u、v)=aC(u)C(v)ΣΣf(i,k) ×cos((2i+1)πu/2M)cos((2k+1)πv/2N ) である。
The coefficient F (u, v) of the two-dimensional discrete cosine transform (DCT) of block size M × N is F (u, v) = aC (u) C (v) ΣΣf (i, k) × cos ((2i + 1) πu / 2M) cos ((2k + 1) πv / 2N).

【0035】ただし、a=2/SQRT(MN)、SQ
RTは平方根の意味、u、vはYUV方式における色差
と輝度、f(i,j)は画像データである。また係数C
(ω)はω=0で1/SQRT(2)、ω≠0で1の
値、最初のΣはi=0〜M−1の総和、あとのΣはk=
0〜N−1の総和である。
However, a = 2 / SQRT (MN), SQ
RT is a square root, u and v are color differences and brightness in the YUV system, and f (i, j) is image data. The coefficient C
(Ω) is 1 / SQRT (2) when ω = 0, a value of 1 when ω ≠ 0, the first Σ is the sum of i = 0 to M−1, and the other Σ is k =
It is the sum of 0 to N-1.

【0036】以上のようにして作成されたファイルを利
用する場合は、以下の手順(処理6〜9)で行う。 (処理6)…圧縮データDTを読み込む。 (処理7)…DTのうちDRに対してはランレングス圧
縮の方法に対するデータ伸長処理を用いて、輪郭データ
を復元する。この例ではハフマン復号化を行う。 (処理8)…DGに対してはハフマン復号化の後、逆量
子化処理を行ってから、逆離散コサイン変換(IDC
T)を行って画像データを復号する。 (処理9)…復号化された画像データに対して、輪郭デ
ータを参照しながら輪郭データの位置を黒いデータに変
更する。すなわち、これによって原画の雰囲気を保持し
た画像が再現できる。
When using the file created as described above, the following procedure (processes 6 to 9) is performed. (Process 6) ... Read the compressed data DT. (Process 7) ... For DR of DT, the contour data is restored by using the data decompression process for the run length compression method. In this example, Huffman decoding is performed. (Processing 8) ... After Huffman decoding is performed on DG, inverse quantization is performed, and then inverse discrete cosine transform (IDC) is performed.
T) is performed to decode the image data. (Processing 9) ... With respect to the decoded image data, the position of the contour data is changed to black data while referring to the contour data. That is, this makes it possible to reproduce an image that retains the atmosphere of the original image.

【0037】なおIDCTはF(u、v)の逆変換であ
るから、画像データf(j,k)は次のように求まる。
すなわち、 f(i,k)=aΣΣC(u)C(v)F(u,v) ×cos((2i+1)uπ/2M)cos((2k+1)vπ/2N ) と求まる。
Since the IDCT is the inverse transformation of F (u, v), the image data f (j, k) is obtained as follows.
That is, f (i, k) = aΣΣC (u) C (v) F (u, v) × cos ((2i + 1) uπ / 2M) cos ((2k + 1) vπ / 2N)

【0038】ただし、最初のΣはu=0〜M−1の総
和、あとのΣはv=0〜N−1の総和である。なお図1
に、以上の画像データ圧縮化および画像データ復号化の
過程を要約した流れを示す。
However, the first Σ is the sum of u = 0 to M−1, and the other Σ is the sum of v = 0 to N−1. FIG. 1
Shows a flow summarizing the process of image data compression and image data decoding described above.

【0039】[0039]

【発明の効果】本発明を用いる以前は、画像データ圧縮
率を高めるために離散コサイン変換(DCT)も用いて
いた。そのため、アニメ調の画像データに対しては輪郭
部分がぼやけて原画の雰囲気が失われてしまった。とい
って、単にランレングス符号化による画像データ圧縮で
は圧縮率が悪く、多数の画像データをROMやCD−R
OMに登録することができなかった。
Before using the present invention, the discrete cosine transform (DCT) was also used to increase the image data compression rate. As a result, the outline part of the image data of an anime tone is blurred and the original image is lost. However, the compression rate of the image data compression by the run length encoding is poor, and a large amount of image data is stored in the ROM or CD-R.
I could not register with OM.

【0040】以上の矛盾する二つの要素を解決したの
が、本発明のDCTとランレングス法を用いた画像デー
タ圧縮法である。すなわち、本発明では輪郭部分に対し
ては直接、量子化してランレングス符号化を行うのでア
ニメ調の雰囲気は失われることなく、なおかつ高いデー
タ圧縮率が保てる。したがって、ROMやCD−ROM
に多くのアニメ調の画像データが登録できるために、画
像が単調にならないゲームソフトが作れるようになっ
た。
The above two contradictory elements are solved by the image data compression method using the DCT and the run length method of the present invention. That is, in the present invention, since the contour portion is directly quantized and run-length encoded, the animation-like atmosphere is not lost and a high data compression rate can be maintained. Therefore, ROM or CD-ROM
Since a lot of animation-like image data can be registered in, it is now possible to create game software in which images are not monotonous.

【0041】本発明の実施例では、ランレングス符号化
の中でも、もっとも圧縮率が高くできるというハフマン
符号化を説明した。ハフマン符号化はフレーム(ここで
は1枚の図面)が変わればランレングス数の出現確率も
変わるために、フレームごとに出現確率を求めなければ
ならない。そのために符号化に時間が掛かる。
In the embodiment of the present invention, the Huffman coding has been described in which the compression rate can be the highest among the run-length coding. In Huffman coding, the appearance probability of the run-length number changes if the frame (here, one drawing) changes, so the appearance probability must be calculated for each frame. Therefore, encoding takes time.

【0042】しかし、ゲームソフトなどの画像データ作
成はあらかじめ1回作成しておけばよく、復元(利用
時)に時間が掛からなければ問題がないから、ハフマン
符号化は画像圧縮に対して非常に有効である。また本発
明の実施例で述べたフィルタの選び方によって輪郭の抜
き出しの仕方を自由に変えることもでき、画像の調子を
変えることも可能である。
However, image data such as game software need only be created once in advance, and there is no problem unless restoration (during use) takes time. Therefore, Huffman coding is very useful for image compression. It is valid. Further, the method of extracting the contour can be freely changed by changing the method of selecting the filter described in the embodiment of the present invention, and the tone of the image can be changed.

【0043】すなわち、本発明の基本的考え方をベース
に、このようなさまざまな他の技術と組み合わせて、よ
り変化に富んだ画像や画像圧縮率の高い圧縮データを作
成することができる効果がある。
That is, based on the basic idea of the present invention, there is an effect that an image richer in variation and compressed data with a high image compression rate can be created by combining with such various other techniques. .

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

【図1】本発明の実施例における画像データの量子化/
圧縮と伸長/復号過程を示す流れ図である。
FIG. 1 is a diagram illustrating quantization / quantization of image data according to an embodiment of the present invention.
6 is a flowchart showing a compression and decompression / decoding process.

【図2】AD変換とDA変換の過程の説明図である。FIG. 2 is an explanatory diagram of a process of AD conversion and DA conversion.

【図3】標本化の過程の説明図である。FIG. 3 is an explanatory diagram of a sampling process.

【図4】量子化におけるスケールとアナログ信号の関係
の説明図である。
FIG. 4 is an explanatory diagram of a relationship between a scale and an analog signal in quantization.

【図5】本発明の実施例における1フレーム当たりの圧
縮データの構成の説明図である。
FIG. 5 is an explanatory diagram of a configuration of compressed data per frame in the embodiment of the present invention.

【図6】本発明の実施例において、ランレングス符号化
の一つとして0区切り記号を用いた場合のランレングス
と符号長の説明図である。
FIG. 6 is an explanatory diagram of run lengths and code lengths when a 0 delimiter is used as one of run length encodings in the embodiment of the present invention.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 アニメ調画像データの高周波数成分を含
む高周波数成分画像データに対してランレングス圧縮処
理を行って第1の中間圧縮画像データを形成し、前記ア
ニメ調画像データの低周波数成分を含む低周波数成分画
像データに対して離散コサイン変換圧縮処理を行って第
2の中間圧縮画像データを形成し、前記第1の中間圧縮
画像データと前記第2の中間圧縮画像データと合成して
1フレームの圧縮画像データを形成することを特徴とす
るアニメ調画像データ圧縮方法。
1. A low-frequency component of the animation-like image data is formed by performing run-length compression processing on the high-frequency component image data including the high-frequency component of the animation-like image data to form first intermediate compressed image data. Discrete cosine transform compression processing is performed on the low-frequency component image data including the above to form second intermediate compressed image data, and the first intermediate compressed image data and the second intermediate compressed image data are synthesized. A method for compressing animation-like image data, which comprises forming compressed image data of one frame.
JP7196095A 1995-07-07 1995-07-07 Animation-like picture data compression method Pending JPH0923429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7196095A JPH0923429A (en) 1995-07-07 1995-07-07 Animation-like picture data compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7196095A JPH0923429A (en) 1995-07-07 1995-07-07 Animation-like picture data compression method

Publications (1)

Publication Number Publication Date
JPH0923429A true JPH0923429A (en) 1997-01-21

Family

ID=16352137

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7196095A Pending JPH0923429A (en) 1995-07-07 1995-07-07 Animation-like picture data compression method

Country Status (1)

Country Link
JP (1) JPH0923429A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006216031A (en) * 1997-09-24 2006-08-17 Ricoh Co Ltd Image feature extraction method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006216031A (en) * 1997-09-24 2006-08-17 Ricoh Co Ltd Image feature extraction method and device

Similar Documents

Publication Publication Date Title
CN103458242B (en) Method for compressing image based on color classification Yu cluster
Salomon Data compression
JP2968582B2 (en) Method and apparatus for processing digital data
US7068849B2 (en) Method and apparatus for compression using reversible wavelet transforms and an embedded codestream
JPH03500599A (en) Apparatus and method for compressing and decompressing digital color video data
JP2006502604A (en) Image compression method for arbitrarily shaped objects
US5835375A (en) Integrated MPEG audio decoder and signal processor
JP4860017B2 (en) Method and apparatus for high speed image compression
US20040240543A1 (en) Low bandwidth video compression
Kountchev et al. Inverse pyramidal decomposition with multiple DCT
US6934420B1 (en) Wave image compression
JPH11187401A (en) Video signal encoder
Sheppard et al. Lapped nonlinear interpolative vector quantization and image super-resolution
JPH0923429A (en) Animation-like picture data compression method
JP2004135254A (en) Image processing device
KR0132895B1 (en) Image compression and expansion method and apparatus for adaptable function
TWI259728B (en) Method of encoding and decoding image data by applying image capturing device
JPH08275153A (en) Image compressor and image decoder
KR100606357B1 (en) Wavelet based multimedia data decomposition and restoration method and system
JPH02504099A (en) Color video data compression method and its system
JP3577093B2 (en) Image coding and restoration device
JP2004289290A (en) Image processing device
JP3132171B2 (en) Decoded image decoding device
JP3835416B2 (en) Image compression apparatus, image compression method, and image compression program
JPH1188183A (en) Wavelet converter, its method, wavelet inverse converter, its method, image coder, its method, image decoder and its method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050412

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050906