JP2006005740A - Image data compression/expansion method, and image processing apparatus - Google Patents

Image data compression/expansion method, and image processing apparatus Download PDF

Info

Publication number
JP2006005740A
JP2006005740A JP2004181146A JP2004181146A JP2006005740A JP 2006005740 A JP2006005740 A JP 2006005740A JP 2004181146 A JP2004181146 A JP 2004181146A JP 2004181146 A JP2004181146 A JP 2004181146A JP 2006005740 A JP2006005740 A JP 2006005740A
Authority
JP
Japan
Prior art keywords
data
image data
compressed
transparent
mask
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.)
Granted
Application number
JP2004181146A
Other languages
Japanese (ja)
Other versions
JP4364729B2 (en
Inventor
Noriyuki Funakubo
則之 船窪
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2004181146A priority Critical patent/JP4364729B2/en
Publication of JP2006005740A publication Critical patent/JP2006005740A/en
Application granted granted Critical
Publication of JP4364729B2 publication Critical patent/JP4364729B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding
    • H04N19/23Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding with coding of regions that are present throughout a whole video segment, e.g. sprites, background or mosaic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image data compression/expansion method and an image processing apparatus which can attain a higher compression rate, and moreover, do not produce a blur at the edge part of a character. <P>SOLUTION: A reference image data is irreversibly compressed, while a mask data indicative of a transparent part of the reference image data is reversibly compressed. Next, each mask data indicative of a transparent part of one or a plurality of original image data following the reference image data is reversibly compressed, while difference data between the one or the plurality of original image data and the reference image data is irreversibly compressed respectively. Next, an original image data next to the one or the plurality of original image data is irreversibly compressed as a reference image data, while a mask data indicative of a transparent part of the reference image data is reversibly compressed. Then, each mask data of one or a plurality of original image data following the reference image data is reversibly compressed, while difference data between the one or the plurality of original image data and the references image data is irreversibly compressed respectively. The above-mentioned processing is repeated. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、スプライト表示用の画像データの圧縮/伸張方法およびそれを用いた画像処理装置に関する。   The present invention relates to a method for compressing / decompressing image data for sprite display and an image processing apparatus using the same.

従来のカラー画像データの圧縮方法として次のような方法が知られている。
(1)セル参照方式、ライン参照方式
これらの方法は、前後に同じカラーコードが続くベタ絵に対しては有効であるが、前後に同じカラーコードがない場合は圧縮率が上がらない欠点がある。また、RGB形式の画像データの非可逆/高能率圧縮ができない欠点がある。
The following methods are known as conventional color image data compression methods.
(1) Cell reference method, line reference method These methods are effective for solid pictures with the same color code before and after, but there is a drawback that the compression rate does not increase if there is no same color code before and after. . In addition, there is a drawback that irreversible / high efficiency compression of RGB format image data is not possible.

(2)辞書法
再現度を上げるために、大きな辞書データが必要となる。セル参照方式、ライン参照方式と同様に可逆圧縮であるため、RGB形式の画像データの非可逆/高能率圧縮ができない欠点がある。
(2) Dictionary method Large dictionary data is required to increase the reproducibility. Since the lossless compression is performed in the same manner as the cell reference method and the line reference method, there is a disadvantage that irreversible / high-efficiency compression of image data in RGB format cannot be performed.

(3)DCT変換+2次元ハフマン符号化(JPEG;Joint Photographic image coding Experts Group))
8×8サイズのブロックを形成してDCT(Discrete Cosine Transform;離散コサイン変換)を行うため圧縮率が上がってくるとブロック単位での歪みが目立つようになる。また、本質的に正弦波で近似するため、アニメ画像などのようにエッジの強い部分をうまく近似できない。また、2次元ハフマン符号化のために複雑なハフマンテーブルが必要となり、テーブル参照等の処理がハードウエア化に不利である。さらに、カラーパレット変換を前提としたインデックス形式の画像データ可逆圧縮ができない欠点がある。
(3) DCT transformation + 2-dimensional Huffman coding (JPEG; Joint Photographic image coding Experts Group)
Since a block of 8 × 8 size is formed and DCT (Discrete Cosine Transform) is performed, distortion in block units becomes conspicuous as the compression rate increases. In addition, since the approximation is essentially a sine wave, a portion having a strong edge such as an animation image cannot be approximated well. Further, a complicated Huffman table is required for two-dimensional Huffman encoding, and processing such as table reference is disadvantageous for hardware implementation. Furthermore, there is a drawback that the index format image data cannot be reversibly compressed on the premise of color palette conversion.

(4)ウエーブレット変換+算術符号化(JPEG2000)
画像圧縮のため2次元ウエーブレット変換を行うためには、画素サイズと同等のメモリをバッファとして必要とし、したがって、ハードウエア化に適しておらず、また、変換時間も多くかかる。算術符号化は演算が複雑で、特に、JPEG2000のようにビットプレーン単位で符号化すると、復号処理に時間がかかってしまう。ウエーブレット変換はDCTと同様に画像の相関を利用しているので、インデックス形式の画像データの可逆圧縮には向かない。
このような従来の圧縮方法に鑑み、この出願の出願人は先に、
特願2002−234984
特願2003−431199
を出願している。
(4) Wavelet transform + arithmetic coding (JPEG2000)
In order to perform the two-dimensional wavelet conversion for image compression, a memory equivalent to the pixel size is required as a buffer, and therefore, it is not suitable for hardware and requires a long conversion time. Arithmetic coding is complicated in operation. In particular, when encoding is performed in units of bit planes as in JPEG2000, decoding processing takes time. Wavelet transform uses image correlation in the same way as DCT, and is not suitable for lossless compression of index-format image data.
In view of such a conventional compression method, the applicant of this application first,
Japanese Patent Application No. 2002-234984
Japanese Patent Application No. 2003-431199
Has been filed.

他方、スプライトによる動画表示においては、通常、スプライトパターンデータがキャラクタ画像のカラーデータと透明データとから構成される。図5は山および木が表示された背景画像の中を自動車が順次動いてゆく動画表示を示す図であり、自動車を順次移動させたスプライトパターンデータD1〜D4を背景画像のスプライトパターンデータBGに重ねて表示することによって動画表示が行われる。そして、この場合のスプライトパターンデータD1〜D4は自動車Jのカラーデータと透明部分Tの透明データとから構成されている。   On the other hand, in moving image display using sprites, sprite pattern data is usually composed of character image color data and transparent data. FIG. 5 is a diagram showing a moving image display in which a car sequentially moves in a background image on which mountains and trees are displayed. Sprite pattern data D1 to D4 obtained by sequentially moving a car are used as sprite pattern data BG of the background image. A moving image is displayed by displaying the images in a superimposed manner. In this case, the sprite pattern data D1 to D4 are composed of the color data of the automobile J and the transparent data of the transparent portion T.

ところで、上述したキャラクタ画像のカラーデータと透明データとから構成されるスプライトパターンデータを圧縮する場合、圧縮率を上げるため上述した非可逆圧縮を用いると透明部分とキャラクタとの接触部において、透明データが異なるデータに変わってしまい、このため、キャラクタのエッジがぼやけてしまう問題が生じる。一方可逆圧縮を用いるとこのような問題は生じないが、圧縮率が低い欠点がある。
本発明は上記事情を考慮してなされたもので、その目的は、高い圧縮率を得ることができ、しかも、エッジ部分のぼやけを生じない画像データ圧縮/伸張方法および画像処理装置を提供することにある。
By the way, when the sprite pattern data composed of the color data and the transparent data of the character image is compressed, the transparent data is used at the contact portion between the transparent portion and the character by using the above-described lossy compression in order to increase the compression rate. Changes to different data, which causes a problem that the edge of the character is blurred. On the other hand, when reversible compression is used, such a problem does not occur, but there is a disadvantage that the compression rate is low.
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an image data compression / decompression method and an image processing apparatus that can obtain a high compression rate and that do not cause blurring of edge portions. It is in.

この発明は上記の課題を解決するためになされたもので、請求項1に記載の発明は、順次連続して表示されるべき元画像データを圧縮する圧縮方法において、一の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、前記基準画像データに続く1または複数の元画像データと前記基準画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、前記1または複数の元画像データの次の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、上記基準画像データに続く1または複数の元画像データと前記基準画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、上記処理を繰り返すことを特徴とする画像データ圧縮方法である。   SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems. The invention according to claim 1 is a compression method for compressing original image data to be displayed sequentially one after another. The image data is irreversibly compressed, and mask data indicating a transparent portion of the reference image data is reversibly compressed, and difference data between one or a plurality of original image data following the reference image data and the reference image data is respectively determined to be non-reversible. In addition to lossless compression, each mask data indicating a transparent portion of the one or more original image data is losslessly compressed, and the original image data next to the one or more original image data is irreversibly compressed as reference image data. , Reversibly compressing mask data indicating a transparent portion of the reference image data, and one or more original image data following the reference image data and the reference image data With each lossy compressed difference data, each mask data indicating the one or more transparent portions of the original image data and lossless compression, an image data compression method, characterized in that the above-described processing is repeated.

請求項2に記載の発明は、順次連続して表示されるべき元画像データを圧縮する圧縮方法において、一の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、前記基準画像データに続く1または複数の元画像データと、それぞれの元画像データの1表示タイミング前の元画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、前記1または複数の元画像データの次の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、上記基準画像データに続く1または複数の元画像データと、それぞれの元画像データの1表示タイミング前の元画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、上記処理を繰り返すことを特徴とする画像データ圧縮方法である。   According to a second aspect of the present invention, there is provided a compression method for compressing original image data to be displayed sequentially and continuously, irreversibly compressing one original image data as reference image data, and a transparent portion of the reference image data. And reversibly compress the mask data indicating the difference data between one or a plurality of original image data following the reference image data and the original image data before one display timing of each original image data, Each mask data indicating a transparent portion of the one or more original image data is reversibly compressed, the original image data next to the one or more original image data is irreversibly compressed as reference image data, and the reference image data The mask data indicating the transparent portion of the image is reversibly compressed, and one or a plurality of original image data following the reference image data and one display of each original image data Image data characterized by irreversibly compressing difference data from original image data before imming, reversibly compressing each mask data indicating a transparent portion of the one or more original image data, and repeating the above processing Compression method.

請求項3に記載の発明は、請求項1に記載の画像データ圧縮方法において、前記基準画像データは、一定数の前記差分データの圧縮が行われる毎に設定されることを特徴とする。
請求項4に記載の発明は、請求項1に記載の画像データ圧縮方法において、前記基準画像データは、前記差分データのデータ量が一定以上となった時に設定されることを特徴とする。
According to a third aspect of the present invention, in the image data compression method according to the first aspect, the reference image data is set every time a certain number of the difference data are compressed.
According to a fourth aspect of the present invention, in the image data compression method according to the first aspect, the reference image data is set when a data amount of the difference data becomes a certain amount or more.

請求項5に記載の発明は、請求項1に記載の画像データ圧縮方法によって圧縮された画像データを伸張する伸張方法において、圧縮された基準画像データおよびマスクデータを伸張し、伸張された該マスクデータに基づいて伸張された該基準画像データの透明部分に透明データを割り当て、圧縮された差分データおよびマスクデータを伸張し、伸張された該マスクデータに基づいて伸張された該差分データの透明部分に透明データを割り当て、前記差分データの透明部分については透明データを出力し、前記差分データの透明部分以外の部分については差分データと基準画像データとを加算して出力することを特徴とする画像データ伸張方法である。   According to a fifth aspect of the present invention, there is provided a decompression method for decompressing image data compressed by the image data compression method according to the first aspect, wherein the compressed reference image data and mask data are decompressed and the mask is decompressed. Transparent data is allocated to the transparent portion of the reference image data expanded based on the data, the compressed differential data and the mask data are expanded, and the transparent portion of the differential data expanded based on the expanded mask data Transparent data is assigned to the transparent data, transparent data is output for the transparent portion of the difference data, and the difference data and the reference image data are added and output for the portions other than the transparent portion of the differential data. This is a data decompression method.

請求項6に記載の発明は、請求項2に記載の画像データ圧縮方法によって圧縮された画像データを伸張する伸張方法において、圧縮された基準画像データおよびマスクデータを伸張し、伸張された該マスクデータに基づいて伸張された該基準画像データの透明部分に透明データを割り当て、圧縮された差分データおよびマスクデータを伸張し、伸張された該マスクデータに基づいて伸張された該差分データの透明部分に透明データを割り当て、透明データが割り当てられた第1の差分データと透明データが割り当てられた基準画像データとを加算して第1の伸張済画像データを取得し、透明データが書き込まれた第2の差分データと透明データが書き込まれた第1の伸張済画像データとを加算して第2の伸張済画像データを取得し、以下、上記処理を繰り返すことを特徴とする画像データ伸張方法である。   According to a sixth aspect of the present invention, there is provided a decompression method for decompressing image data compressed by the image data compression method according to the second aspect, wherein the compressed reference image data and mask data are decompressed and the mask is decompressed. Transparent data is allocated to the transparent portion of the reference image data expanded based on the data, the compressed differential data and the mask data are expanded, and the transparent portion of the differential data expanded based on the expanded mask data The transparent data is assigned to the first difference data to which the transparent data is assigned and the reference image data to which the transparent data is assigned to obtain the first decompressed image data, and the transparent data is written in the first data 2 to obtain the second decompressed image data by adding the difference data of 2 and the first decompressed image data in which the transparent data is written. An image data decompression method and repeating the process.

請求項7に記載の発明は、画像データを非可逆圧縮した圧縮済画像データと、差分データを非可逆圧縮した圧縮済差分データと、該画像データおよび該差分データの各透明部分を示すマスクデータを可逆圧縮した圧縮済マスクデータとからなる表示データに基づいて表示装置に画像表示を行う画像処理装置において、前記圧縮済画像データ、圧縮済差分データ、圧縮済マスクデータをそれぞれ伸張する伸張手段と、前記伸張手段によって伸張された伸張済画像データおよび伸張済差分データに、前記伸張済マスクデータに基づいて透明データを割り当てる透明処理手段と、前記透明処理後の画像データと透明処理後の差分データとを加算する加算手段と、前記透明処理後の画像データまたは前記加算手段の出力データの一方を選択して出力する選択手段と、前記選択手段の出力が書き込まれるフレームバッファとを具備し、前記フレームバッファ内のデータに基づいて画像表示を行うことを特徴とする画像処理装置である。   The invention according to claim 7 includes compressed image data obtained by irreversibly compressing image data, compressed difference data obtained by irreversibly compressing difference data, and mask data indicating each transparent portion of the image data and the difference data. An image processing apparatus for displaying an image on a display device based on display data comprising reversibly compressed compressed mask data, decompression means for decompressing the compressed image data, the compressed differential data, and the compressed mask data, respectively Transparent processing means for assigning transparent data to the decompressed image data and decompressed differential data decompressed by the decompressing means based on the decompressed mask data, the image data after the transparent processing, and the differential data after the transparent processing And adding means for adding one of the image data after the transparent processing or the output data of the adding means Selecting means, comprising a frame buffer for output of said selecting means is written, an image processing device and performs image display based on the data in the frame buffer.

この発明によれば、非可逆圧縮によって画像データおよび差分データを圧縮し、また、透明部分に対応するマスクデータを別途用意し、このマスクデータを可逆圧縮によって圧縮する。これにより、非可逆圧縮による高い圧縮率を得ることができると同時に、マスクデータによりエッジ部分のぼやけを防ぐことができる。   According to the present invention, image data and difference data are compressed by irreversible compression, and mask data corresponding to a transparent portion is separately prepared, and the mask data is compressed by lossless compression. Thereby, a high compression ratio by irreversible compression can be obtained, and at the same time, blurring of the edge portion can be prevented by the mask data.

以下、図面を参照し、この発明の実施の形態について説明する。図1はこの発明の一実施の形態による画像データ圧縮/伸張方法を示す説明図である。この図において、F1、F2は圧縮前のYUV(輝度・色差・色差)カラーデータによる元画像データであり、表示の際には、F1、F2の順に表示される。また、画像データF2は画像データF1の楕円状のキャラクタが右方向に僅かに移動した場合の画像データである。画像データF1はキャラクタの色を指示するキャラクタデータC1とキャラクタの周囲に設定された透明データE1とから構成されている。同様に、画像データF2はキャラクタの色を指示するキャラクタデータC2とキャラクタの周囲に設定された透明データE2とから構成されている。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is an explanatory diagram showing an image data compression / decompression method according to one embodiment of the present invention. In this figure, F1 and F2 are original image data by YUV (luminance / color difference / color difference) color data before compression, and are displayed in the order of F1 and F2 at the time of display. The image data F2 is image data when the elliptical character of the image data F1 is slightly moved in the right direction. The image data F1 is composed of character data C1 indicating the color of the character and transparent data E1 set around the character. Similarly, the image data F2 is composed of character data C2 indicating the color of the character and transparent data E2 set around the character.

この実施形態による圧縮/伸張方法においては、まず、画像データF1、F2に基づいて透明領域の各ドットを指示するマスクデータM1(図示略)、M2が生成される。この場合、マスクデータM1、M2は、透明領域の各ドットに対応するデータが”1”、キャラクタ領域の各ドットに対応するデータが”0”となる。次に、画像データF1、F2の対応する各ドットデータの差
P2=F2−F1
が演算され、差分データP2が求められる。そして、画像データF1、差分データP2が非可逆圧縮方式によって高圧縮率で圧縮され、また、マスクデータM1、M2が可逆圧縮によって圧縮され、記憶媒体に記憶される。
In the compression / decompression method according to this embodiment, first, mask data M1 (not shown) and M2 for designating each dot in the transparent area are generated based on the image data F1 and F2. In this case, in the mask data M1 and M2, data corresponding to each dot in the transparent area is “1”, and data corresponding to each dot in the character area is “0”. Next, the difference between the corresponding dot data of the image data F1 and F2
P2 = F2-F1
Is calculated to obtain the difference data P2. Then, the image data F1 and the difference data P2 are compressed at a high compression rate by the irreversible compression method, and the mask data M1 and M2 are compressed by the lossless compression and stored in the storage medium.

このように、この発明の実施形態による圧縮処理においては、1画像データおきに「元画像データおよびマスクデータ」「差分データおよびマスクデータ」が順次圧縮処理され、記憶媒体に記録される。   As described above, in the compression processing according to the embodiment of the present invention, “original image data and mask data” and “difference data and mask data” are sequentially compressed and recorded on the storage medium every other image data.

次に、伸張方法を図1に従って説明する。まず、圧縮済みの画像データF1および圧縮済みのマスクデータM1を伸張し、次いで、マスクデータM1のデータ”1”に対応する伸張後の画像データF1の領域に透明データを書き込む。なお、ここでは、透明データを”00002(16進数)”としている。これにより、画像データF1がほぼ再生された再生画像データF1a(図1)が得られ、しかも、再生画像データF1aのキャラクタ周辺部にぼやけが生じない。次に、圧縮済みの差分データP2および圧縮済みのマスクデータM2を伸張し、次いで、マスクデータM2のデータ”1”に対応する伸張後の差分データP2の領域に透明データを書き込む。これにより、画像データF2のキャラクタに対応する領域の差分データP2とその周囲の透明データとからなる差分データP2a(図1)が得られる。   Next, the expansion method will be described with reference to FIG. First, the compressed image data F1 and the compressed mask data M1 are decompressed, and then transparent data is written in the area of the decompressed image data F1 corresponding to the data “1” of the mask data M1. Here, the transparent data is “00002 (hexadecimal)”. As a result, reproduced image data F1a (FIG. 1) in which the image data F1 is substantially reproduced is obtained, and the character peripheral portion of the reproduced image data F1a is not blurred. Next, the compressed differential data P2 and the compressed mask data M2 are expanded, and then transparent data is written in the expanded differential data P2 area corresponding to the data “1” of the mask data M2. Thereby, the difference data P2a (FIG. 1) consisting of the difference data P2 in the area corresponding to the character of the image data F2 and the surrounding transparent data is obtained.

次に、再生画像データF1aと上記差分データP2aを対応する各ドットのデータ毎に加算することによって、画像データF2を再生した再生画像データF2aを得る。ただし、この場合、差分データP2aが透明データ”00002”の場合は加算を行わず、透明データ”00002”を書き込む。そして、得られた再生画像データF1a、F2aがRGB(赤・緑・青)カラーデータに変換され表示される、
このように、上記実施形態による圧縮/伸張方法は差分をとって圧縮することにより圧縮率を上げ、かつ、マスクデータを使用することによってキャラクタの周辺部のぼやけを防いでいる。
Next, the reproduction image data F2a obtained by reproducing the image data F2 is obtained by adding the reproduction image data F1a and the difference data P2a for each corresponding dot data. However, in this case, when the difference data P2a is transparent data “00002”, addition is not performed and transparent data “00002” is written. The obtained reproduced image data F1a and F2a are converted into RGB (red / green / blue) color data and displayed.
As described above, the compression / decompression method according to the above embodiment increases the compression rate by taking the difference and compresses, and prevents blurring of the peripheral portion of the character by using the mask data.

また、上記実施形態においては、元画像データの1つおきに差分データとしているが、図2に示すように、基準画像データ1つに対し、差分データを複数(図2では4つ)としてもよい。すなわち、図2において、F1〜F6は順次表示される元画像データであり、まず、基準画像データとなる元画像データF1をそのまま圧縮して圧縮画像データK1とし、次に、元画像データF2と元画像データF1との差分データを圧縮して圧縮差分データd2とし、次に、元画像データF3と元画像データF1との差分データを圧縮して圧縮差分データd3とし、同様にして圧縮差分データd4、d5を求める。次に、元画像データF6を基準画像データとしてそのまま圧縮して圧縮画像データK2とし、次いで、順次差分データを求める。そして、得られたデータK1、d2、d3、d4、d5、K2・・・を記憶媒体に記憶させる。   In the above embodiment, every other original image data is set as difference data. However, as shown in FIG. 2, a plurality of difference data (four in FIG. 2) may be used for one reference image data. Good. That is, in FIG. 2, F1 to F6 are original image data that are sequentially displayed. First, the original image data F1 serving as the reference image data is compressed as it is into the compressed image data K1, and then the original image data F2 The difference data from the original image data F1 is compressed into compressed difference data d2, and then the difference data between the original image data F3 and the original image data F1 is compressed into compressed difference data d3. Similarly, the compressed difference data d4 and d5 are obtained. Next, the original image data F6 is compressed as reference image data as it is to obtain compressed image data K2, and then difference data is sequentially obtained. Then, the obtained data K1, d2, d3, d4, d5, K2,... Are stored in a storage medium.

なお、図2では、マスクデータの記載を省略している。また、図において、d2→d5の順で四角が大きくなっているのは、一般に、元画像データF1から離れるに従って差分が大きくなることを示している。   In FIG. 2, the description of the mask data is omitted. In the figure, the squares increasing in the order of d2 → d5 generally indicate that the difference increases as the distance from the original image data F1 increases.

次に、圧縮データの再生時においては、まず、圧縮画像データK1を伸張して再生画像データI1(=F1a)を得る。次に、圧縮差分データd2を伸張し、伸張後のデータと再生画像データI1を加算することによって再生画像データF2aを得る。以下同様にして再生画像データF3a、F4a、F5aを得る。次に、圧縮画像データK2を伸張して再生画像データI2(=F6a)を得る。以下同様の処理が繰り返される。   Next, when the compressed data is reproduced, first, the compressed image data K1 is expanded to obtain reproduced image data I1 (= F1a). Next, the compressed difference data d2 is expanded, and the decompressed data and the reproduced image data I1 are added to obtain reproduced image data F2a. Thereafter, reproduced image data F3a, F4a, and F5a are obtained in the same manner. Next, the compressed image data K2 is expanded to obtain reproduced image data I2 (= F6a). Thereafter, the same processing is repeated.

また、図3に示すように、常に、1つ前の元画像データとの差分データを求め、圧縮して記憶媒体に記録してもよい。すなわち、図3において、F1〜F6は順次表示される元画像データであり、まず、基準画像データとなる元画像データF1をそのまま圧縮して圧縮画像データK1とし、次に、元画像データF2と元画像データF1との差分データを圧縮して圧縮差分データd2とし、次に、元画像データF3と元画像データF2との差分データを圧縮して圧縮差分データd3とし、同様にして圧縮差分データd4、d5を求める。次に、元画像データF6を基準画像データとしてそのまま圧縮して圧縮画像データK2とし、次いで、順次同様にして差分データを求める。そして、得られたデータK1、d2、d3、d4、d5、K2・・・を記憶媒体に記憶させる。なお、図3では、マスクデータの記載を省略している。   Also, as shown in FIG. 3, difference data from the previous original image data may always be obtained, compressed, and recorded on a storage medium. That is, in FIG. 3, F1 to F6 are sequentially displayed original image data. First, the original image data F1 serving as the reference image data is compressed as it is into the compressed image data K1, and then the original image data F2 and The difference data from the original image data F1 is compressed to be compressed difference data d2, and then the difference data between the original image data F3 and the original image data F2 is compressed to be compressed difference data d3. d4 and d5 are obtained. Next, the original image data F6 is compressed as reference image data as it is to obtain compressed image data K2, and then difference data is obtained sequentially in the same manner. Then, the obtained data K1, d2, d3, d4, d5, K2,... Are stored in a storage medium. In FIG. 3, the mask data is not shown.

次に、圧縮データの再生時においては、まず、圧縮画像データK1を伸張して再生画像データI1(=F1a)を得る。次に、圧縮差分データd2を伸張し、伸張後のデータと再生画像データI1を加算することによって再生画像データF2aを得る。次に、圧縮差分データd3を伸張し、伸張後のデータと再生画像データF2aを加算することによって再生画像データF3aを得る。以下同様にして再生画像データF4a、F5aを得る。次に、圧縮画像データK2を伸張して再生画像データI2(=F6a)を得る。以下同様の処理が繰り返される。
なお、上記の例においては差分データの数を固定数としているが、これに代えて、差分データのデータ量が一定以上になった場合に、基準画像データを用意するようにしてもよい。
Next, when the compressed data is reproduced, first, the compressed image data K1 is expanded to obtain reproduced image data I1 (= F1a). Next, the compressed difference data d2 is expanded, and the decompressed data and the reproduced image data I1 are added to obtain reproduced image data F2a. Next, the compressed difference data d3 is expanded, and the decompressed data and the reproduced image data F2a are added to obtain reproduced image data F3a. Thereafter, reproduced image data F4a and F5a are obtained in the same manner. Next, the compressed image data K2 is expanded to obtain reproduced image data I2 (= F6a). Thereafter, the same processing is repeated.
In the above example, the number of difference data is a fixed number, but instead, the reference image data may be prepared when the data amount of the difference data exceeds a certain level.

次に、前述した画像データの伸張方法を用いた画像処理装置を図4を参照して説明する。図4は同画像処理装置の構成を示すブロック図であり、この図に示す画像処理装置は、図1において説明した「圧縮画像データおよび圧縮マスクデータ」、「圧縮差分データおよび圧縮マスクデータ」を交互に記憶させた記憶媒体の画像データを再生する装置である。   Next, an image processing apparatus using the above-described image data expansion method will be described with reference to FIG. FIG. 4 is a block diagram showing the configuration of the image processing apparatus. The image processing apparatus shown in FIG. 4 stores the “compressed image data and compressed mask data” and “compressed differential data and compressed mask data” described in FIG. This is an apparatus for reproducing image data of a storage medium stored alternately.

図4において、符号1は記憶媒体から読み出された圧縮データ(YUVデータ)が一時記憶されるFIFO(先入れ/先出し)メモリである。2はFIFOメモリ1から順次出力される圧縮画像(または差分)データおよび圧縮マスクデータを伸張する伸張回路であり、伸張後のYデータ、Uデータ、Vデータがそれぞれバッファ3a、〜3cに書き込まれ、マスクデータがバッファ3dに書き込まれる。4はバッファ3a〜3c内のYUVデータをRGBデータに変換するYUV→RGB変換回路である。5はセレクタであり、バッファ3dから出力されるマスクデータが”0”の時はYUV→RGB変換回路4から出力されるRGBデータを選択して出力し、”1”の時は透明データ”00002”を選択して出力する。このセレクタ5の処理によって、再生画像の透明データが正しく設定され、これにより、キャラクタの境界部分のぼやけを防ぐことができる。   In FIG. 4, reference numeral 1 denotes a FIFO (first-in / first-out) memory in which compressed data (YUV data) read from a storage medium is temporarily stored. Reference numeral 2 denotes a decompression circuit that decompresses compressed image (or difference) data and compression mask data sequentially output from the FIFO memory 1, and the decompressed Y data, U data, and V data are respectively written in the buffers 3a to 3c. The mask data is written into the buffer 3d. Reference numeral 4 denotes a YUV → RGB conversion circuit for converting the YUV data in the buffers 3a to 3c into RGB data. Reference numeral 5 denotes a selector. When the mask data output from the buffer 3d is “0”, the RGB data output from the YUV → RGB conversion circuit 4 is selected and output. When the mask data is “1”, the transparent data “00002” is selected. Select "" to output. By the processing of the selector 5, the transparent data of the reproduced image is correctly set, and thereby blurring of the boundary portion of the character can be prevented.

6は加算回路、7はセレクタ、8はフレームバッファである。加算回路6はフレームバッファ8から読み出された1表示サイクル前の画像データにセレクタ5から読み出された画像データを加算してセレクタ7へ出力する。すなわち、加算回路6は、図1において説明した
F2a=F1a+P2a
の演算を行い、その結果をセレクタ7へ出力する。ただし、セレクタ5から透明データが出力された場合は、その透明データを無条件で出力する。セレクタ7は1表示サイクル毎にセレクタ5から出力されるデータと、加算回路6から出力されるデータとを交互に選択して出力する。すなわち、セレクタ5から画像データが出力されるタイミングにおいては、セレクタ5の出力データを選択してフレームバッファ8へ出力し、セレクタ5から差分データが出力されるタイミングにおいては、加算回路6の出力データを選択してフレームバッファ8へ出力する。
6 is an adder circuit, 7 is a selector, and 8 is a frame buffer. The adder circuit 6 adds the image data read from the selector 5 to the image data before one display cycle read from the frame buffer 8 and outputs the result to the selector 7. That is, the adding circuit 6 is the same as the F2a = F1a + P2a described in FIG.
And outputs the result to the selector 7. However, when transparent data is output from the selector 5, the transparent data is output unconditionally. The selector 7 alternately selects and outputs the data output from the selector 5 and the data output from the adder circuit 6 every display cycle. That is, at the timing when the image data is output from the selector 5, the output data of the selector 5 is selected and output to the frame buffer 8, and at the timing when the difference data is output from the selector 5, the output data of the adder circuit 6 is output. Is output to the frame buffer 8.

フレームバッファ8は2バッファ構成であり、セレクタ7から出力された画像データが一方のバッファに書き込まれている時、他方のバッファの画像データが読み出されて表示装置へ出力され、次の表示サイクルにおいては2バッファが逆に使用され、この動作が交互に繰り返される。   The frame buffer 8 has a two-buffer configuration. When the image data output from the selector 7 is written in one buffer, the image data in the other buffer is read out and output to the display device, and the next display cycle. 2 buffers are used in reverse, and this operation is repeated alternately.

なお、上記実施形態はYUVデータを圧縮して記憶媒体に記憶させ、そのYUVデータを伸張した後RGBデータに戻して表示するようにしているが、RGBデータを圧縮して記憶させ、伸張して表示してもよい。ただし、YUVデータの場合はU,Vデータの間引き処理を利用すればさらに圧縮率を上げることができる。   In the above embodiment, YUV data is compressed and stored in a storage medium, and the YUV data is decompressed and then returned to RGB data for display. However, the RGB data is compressed and stored, and decompressed. It may be displayed. However, in the case of YUV data, the compression rate can be further increased by using a thinning process for U and V data.

この発明は、家庭用ゲーム機やパチンコ等の遊技機の画像表示に用いられる。   The present invention is used for image display of game machines such as home game machines and pachinko machines.

この発明の一実施形態による画像データ圧縮/伸張方法を説明するための説明図である。It is explanatory drawing for demonstrating the image data compression / decompression method by one Embodiment of this invention. 圧縮方法の他の例を説明するための説明図である。It is explanatory drawing for demonstrating the other example of the compression method. 圧縮方法の他の例を説明するための説明図である。It is explanatory drawing for demonstrating the other example of the compression method. この発明の一実施形態による画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention. スプライトによる動画表示を説明するための説明図である。It is explanatory drawing for demonstrating the moving image display by a sprite.

符号の説明Explanation of symbols

1…FIFOメモリ、2…伸張回路、3a〜3d…バッファ、4…YUV→RGB変換回路、5…セレクタ、6…加算回路、7…セレクタ、8…フレームバッファ。 DESCRIPTION OF SYMBOLS 1 ... FIFO memory, 2 ... Decompression circuit, 3a-3d ... Buffer, 4 ... YUV-> RGB conversion circuit, 5 ... Selector, 6 ... Adder circuit, 7 ... Selector, 8 ... Frame buffer.

Claims (7)

順次連続して表示されるべき元画像データを圧縮する圧縮方法において、
一の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、
前記基準画像データに続く1または複数の元画像データと前記基準画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、
前記1または複数の元画像データの次の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、
上記基準画像データに続く1または複数の元画像データと前記基準画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、
上記処理を繰り返すことを特徴とする画像データ圧縮方法。
In a compression method for compressing original image data to be sequentially displayed,
Irreversibly compress one original image data as reference image data, and reversibly compress mask data indicating a transparent portion of the reference image data,
The difference data between one or a plurality of original image data following the reference image data and the reference image data is irreversibly compressed, and each mask data indicating a transparent portion of the one or more original image data is reversibly compressed. ,
The original image data next to the one or more original image data is irreversibly compressed as reference image data, and the mask data indicating the transparent portion of the reference image data is reversibly compressed,
The difference data between the one or more original image data following the reference image data and the reference image data is irreversibly compressed, and each mask data indicating a transparent portion of the one or more original image data is reversibly compressed. ,
An image data compression method characterized by repeating the above processing.
順次連続して表示されるべき元画像データを圧縮する圧縮方法において、
一の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、
前記基準画像データに続く1または複数の元画像データと、それぞれの元画像データの1表示タイミング前の元画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、
前記1または複数の元画像データの次の元画像データを基準画像データとして非可逆圧縮すると共に、該基準画像データの透明部分を示すマスクデータを可逆圧縮し、
上記基準画像データに続く1または複数の元画像データと、それぞれの元画像データの1表示タイミング前の元画像データとの差分データを各々非可逆圧縮すると共に、該1または複数の元画像データの透明部分を示す各マスクデータを可逆圧縮し、
上記処理を繰り返すことを特徴とする画像データ圧縮方法。
In a compression method for compressing original image data to be sequentially displayed,
Irreversibly compress one original image data as reference image data, and reversibly compress mask data indicating a transparent portion of the reference image data,
The difference data between one or a plurality of original image data following the reference image data and the original image data before one display timing of each original image data is irreversibly compressed, and the one or more original image data Reversibly compress each mask data indicating the transparent part,
The original image data next to the one or more original image data is irreversibly compressed as reference image data, and the mask data indicating the transparent portion of the reference image data is reversibly compressed,
The difference data between one or a plurality of original image data following the reference image data and the original image data before one display timing of each original image data is irreversibly compressed, and the one or more original image data Reversibly compress each mask data indicating the transparent part,
An image data compression method characterized by repeating the above processing.
前記基準画像データは、一定数の前記差分データの圧縮が行われる毎に設定されることを特徴とする請求項1に記載の画像データ圧縮方法。   The image data compression method according to claim 1, wherein the reference image data is set every time a certain number of the difference data are compressed. 前記基準画像データは、前記差分データのデータ量が一定以上となった時に設定されることを特徴とする請求項1に記載の画像データ圧縮方法。   The image data compression method according to claim 1, wherein the reference image data is set when a data amount of the difference data becomes equal to or greater than a certain value. 請求項1に記載の画像データ圧縮方法によって圧縮された画像データを伸張する伸張方法において、
圧縮された基準画像データおよびマスクデータを伸張し、
伸張された該マスクデータに基づいて伸張された該基準画像データの透明部分に透明データを割り当て、
圧縮された差分データおよびマスクデータを伸張し、
伸張された該マスクデータに基づいて伸張された該差分データの透明部分に透明データを割り当て、
前記差分データの透明部分については透明データを出力し、前記差分データの透明部分以外の部分については差分データと基準画像データとを加算して出力する
ことを特徴とする画像データ伸張方法。
A decompression method for decompressing image data compressed by the image data compression method according to claim 1.
Decompress the compressed reference image data and mask data,
Assigning transparent data to transparent portions of the reference image data expanded based on the expanded mask data;
Decompress the compressed difference data and mask data,
Assigning transparent data to the transparent portion of the differential data expanded based on the expanded mask data;
An image data decompression method, comprising: outputting transparent data for a transparent portion of the difference data, and adding and outputting the difference data and reference image data for a portion other than the transparent portion of the difference data.
請求項2に記載の画像データ圧縮方法によって圧縮された画像データを伸張する伸張方法において、
圧縮された基準画像データおよびマスクデータを伸張し、
伸張された該マスクデータに基づいて伸張された該基準画像データの透明部分に透明データを割り当て、
圧縮された差分データおよびマスクデータを伸張し、
伸張された該マスクデータに基づいて伸張された該差分データの透明部分に透明データを割り当て、
透明データが割り当てられた第1の差分データと透明データが割り当てられた基準画像データとを加算して第1の伸張済画像データを取得し、
透明データが書き込まれた第2の差分データと透明データが書き込まれた第1の伸張済画像データとを加算して第2の伸張済画像データを取得し、
以下、上記処理を繰り返すことを特徴とする画像データ伸張方法。
A decompression method for decompressing image data compressed by the image data compression method according to claim 2,
Decompress the compressed reference image data and mask data,
Assigning transparent data to transparent portions of the reference image data expanded based on the expanded mask data;
Decompress the compressed difference data and mask data,
Assigning transparent data to the transparent portion of the differential data expanded based on the expanded mask data;
Adding first difference data to which transparent data is assigned and reference image data to which transparent data is assigned to obtain first decompressed image data;
Adding the second difference data in which the transparent data is written and the first decompressed image data in which the transparent data is written to obtain the second decompressed image data;
Hereinafter, an image data expansion method characterized by repeating the above processing.
画像データを非可逆圧縮した圧縮済画像データと、差分データを非可逆圧縮した圧縮済差分データと、該画像データおよび該差分データの各透明部分を示すマスクデータを可逆圧縮した圧縮済マスクデータとからなる表示データに基づいて表示装置に画像表示を行う画像処理装置において、
前記圧縮済画像データ、圧縮済差分データ、圧縮済マスクデータをそれぞれ伸張する伸張手段と、
前記伸張手段によって伸張された伸張済画像データおよび伸張済差分データに、前記伸張済マスクデータに基づいて透明データを割り当てる透明処理手段と、
前記透明処理後の画像データと透明処理後の差分データとを加算する加算手段と、
前記透明処理後の画像データまたは前記加算手段の出力データの一方を選択して出力する選択手段と、
前記選択手段の出力が書き込まれるフレームバッファと、
を具備し、前記フレームバッファ内のデータに基づいて画像表示を行うことを特徴とする画像処理装置。
Compressed image data obtained by irreversibly compressing image data, compressed differential data obtained by irreversibly compressing difference data, compressed mask data obtained by reversibly compressing the image data and mask data indicating each transparent portion of the difference data, In an image processing apparatus that displays an image on a display device based on display data consisting of:
Decompression means for decompressing each of the compressed image data, the compressed differential data, and the compressed mask data;
Transparent processing means for assigning transparent data to the decompressed image data and decompressed differential data decompressed by the decompressing means based on the decompressed mask data;
Adding means for adding the image data after the transparent process and the difference data after the transparent process;
A selecting means for selecting and outputting one of the image data after the transparent processing or the output data of the adding means;
A frame buffer into which the output of the selection means is written;
And an image processing apparatus for displaying an image based on data in the frame buffer.
JP2004181146A 2004-06-18 2004-06-18 Image data compression / decompression method and image processing apparatus Expired - Fee Related JP4364729B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004181146A JP4364729B2 (en) 2004-06-18 2004-06-18 Image data compression / decompression method and image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004181146A JP4364729B2 (en) 2004-06-18 2004-06-18 Image data compression / decompression method and image processing apparatus

Publications (2)

Publication Number Publication Date
JP2006005740A true JP2006005740A (en) 2006-01-05
JP4364729B2 JP4364729B2 (en) 2009-11-18

Family

ID=35773730

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004181146A Expired - Fee Related JP4364729B2 (en) 2004-06-18 2004-06-18 Image data compression / decompression method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP4364729B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012066890A1 (en) * 2010-11-17 2012-05-24 日本精機株式会社 Display device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012066890A1 (en) * 2010-11-17 2012-05-24 日本精機株式会社 Display device

Also Published As

Publication number Publication date
JP4364729B2 (en) 2009-11-18

Similar Documents

Publication Publication Date Title
KR100609614B1 (en) Method and apparatus for transmitting picture data, processing pictures and recording medium therefor
JP4130207B2 (en) Image processing display device and image processing display method
US6985630B2 (en) Image processing apparatus and method, program and storage medium
JP2006014341A (en) Method and apparatus for storing image data using mcu buffer
CN105933708B (en) A kind of method and apparatus of data compression and decompression
JP5158096B2 (en) Encoding data generation apparatus, encoding data generation method, decoding apparatus, and decoding method
US7574056B2 (en) Method for compression and expansion of display data
JP3462867B2 (en) Image compression method and apparatus, image compression program, and image processing apparatus
JPH1188700A (en) Coding method of color image signal, and decoding method and color image processor thereof
JPH1196345A (en) Method for compressing and inversely compressing graphics image
US5999112A (en) Data compression apparatus and method, data expansion apparatus and method, and recording medium
JPH11308465A (en) Encoding method for color image, encoder therefor, decoding method for color image and decoder therefor
JP4364729B2 (en) Image data compression / decompression method and image processing apparatus
JP3729172B2 (en) Image encoding apparatus and method, and encoded image decoding apparatus and method
WO2003081898A1 (en) Image data compression device, image data compression method, recording medium, and program
US20070165047A1 (en) Graphic rendering system capable of performing real-time compression and decompression
JP4274187B2 (en) Display data decompression method, display data compression / decompression method, display data decompression device, and display data compression / decompression device
JPH1130978A (en) Color image encoding method and its encoder and color image decoding method and its decoder
JP3711104B2 (en) Image compression apparatus and image compression method
JP2798025B2 (en) Video coding method and apparatus
KR100834357B1 (en) Device and method for compressing image data
KR20220149124A (en) A image signal processor, a method of operating a image signal processor and a image processing system including the image processing device
JPH02237269A (en) High efficiency compression recording display system for color picture
JPH0283578A (en) Device and method for image data display
JPS61198877A (en) Data compression coding method in computer animation

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060516

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060718

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060912

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090819

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

Free format text: PAYMENT UNTIL: 20120828

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4364729

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130828

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees