JP2009194415A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2009194415A
JP2009194415A JP2008029978A JP2008029978A JP2009194415A JP 2009194415 A JP2009194415 A JP 2009194415A JP 2008029978 A JP2008029978 A JP 2008029978A JP 2008029978 A JP2008029978 A JP 2008029978A JP 2009194415 A JP2009194415 A JP 2009194415A
Authority
JP
Japan
Prior art keywords
data
block
transparency
image
alpha
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
JP2008029978A
Other languages
Japanese (ja)
Other versions
JP4521835B2 (en
Inventor
Shusaku Sawato
周作 澤戸
Jiro Aoyama
二郎 青山
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.)
DIGITAL MEDIA PROFESSIONAL KK
Digital Media Professionals Inc
Nifco Advanced Technology Inc
Original Assignee
DIGITAL MEDIA PROFESSIONAL KK
Digital Media Professionals Inc
Nifco Advanced Technology Inc
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 DIGITAL MEDIA PROFESSIONAL KK, Digital Media Professionals Inc, Nifco Advanced Technology Inc filed Critical DIGITAL MEDIA PROFESSIONAL KK
Priority to JP2008029978A priority Critical patent/JP4521835B2/en
Publication of JP2009194415A publication Critical patent/JP2009194415A/en
Application granted granted Critical
Publication of JP4521835B2 publication Critical patent/JP4521835B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image compression device for an image format incapable of containing alpha data that compresses an image with alpha data attached. <P>SOLUTION: An image processing apparatus includes an image data input part 1, a first conversion part 3 for dividing a data block into a color data block and a transparency data block and converting the color data block into a macro block of color data, a second conversion part 5 for converting the transparency data block as a color data block into a macro block of transparency data, a coding part 7 for combining the macro block of color data and the macro block of transparency data into a set of macro blocks and coding the set of macro blocks, and an output part 9 for outputting the coded data. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は,アルファデータを有さない画像変換を行う符号化装置に対して,変換画像にアルファデータを持たせることができる画像処理装置などに関する。   The present invention relates to an image processing apparatus that can provide alpha data in a converted image for an encoding apparatus that performs image conversion without alpha data.

アルファデータは,コンピュータグラフィックスにおいて,主に画像の透明度を指定するために用いられる情報である。たとえば,背景の画像に半透明の物体の画像を重ねる画像処理を行う場合,半透明の物体のアルファデータを用いて画像処理を行う。このような編集作業を効果的に行うため,画像圧縮方法として,画像の色情報とアルファデータとを持たせた状態で画像を圧縮する方法が知られている。たとえば,PNG (Portable Network Graphic)フォーマット画像は,アルファデータを有する画像である。   Alpha data is information used mainly in computer graphics to specify the transparency of an image. For example, when performing image processing for superimposing a translucent object image on a background image, image processing is performed using alpha data of the translucent object. In order to effectively perform such editing work, a method of compressing an image with image color information and alpha data is known as an image compression method. For example, a PNG (Portable Network Graphic) format image is an image having alpha data.

一方,静止画像のデジタルデータの保存方法として,JPEG方式やMPEG方式などが知られている。たとえば,JPEG方式は,圧縮の効率が良いため,広く画像圧縮処理に用いられている。しかしながら,JPEG方式により圧縮された画像データは,アルファデータを持たない。すなわち,JPEG方式により圧縮された画像データは,アルファデータを持たないので,画像を重ね合わせる際に透明感を表現できない。   On the other hand, as a method for storing still image digital data, a JPEG method, an MPEG method, or the like is known. For example, the JPEG method is widely used for image compression processing because of its high compression efficiency. However, image data compressed by the JPEG method does not have alpha data. That is, the image data compressed by the JPEG method does not have alpha data, so that it is not possible to express transparency when the images are superimposed.

このような問題を解決するため,特開2003−116004号公報(下記特許文献1)には,アルファチャネルを画像データと多重化し,多重化したデータをJPEG方式で圧縮する技術が開示されている。すなわち,特開2003−116004号公報は,透明部分を含む画像ファイルを生成する画像ファイル生成装置に関する。この画像ファイル生成装置は,画像データ生成部と圧縮部とを備える。そして,画像データ生成部は,画素ごとに,色の階調値(R,G,B)と透明度パラメータ(アルファ)とを含んだ画像データを生成する(段落[0022])。そのうえで,圧縮部が,この画像データをJPEGフォーマットなどで圧縮する(段落[0008])。   In order to solve such a problem, Japanese Patent Application Laid-Open No. 2003-116004 (Patent Document 1 below) discloses a technique for multiplexing an alpha channel with image data and compressing the multiplexed data using the JPEG method. . That is, Japanese Patent Laid-Open No. 2003-116004 relates to an image file generation device that generates an image file including a transparent portion. The image file generation device includes an image data generation unit and a compression unit. Then, the image data generation unit generates image data including a color gradation value (R, G, B) and a transparency parameter (alpha) for each pixel (paragraph [0022]). In addition, the compression unit compresses the image data in the JPEG format or the like (paragraph [0008]).

特開2003−116004号公報に開示された装置では,アルファデータも圧縮される。そこで,特開2005−151207号公報(下記特許文献2)では,コンポーネントごとにJPEG圧縮することで,アルファデータが圧縮される事態を防ぐ技術が開示されている。すなわち,入力画像データがRGBの計3個のコンポーネントを有している場合,画像データに第4のコンポーネントを追加する。そして,その第4のコンポーネントに対して入力画像に付随するアルファチャンネルのデータを格納する(段落[0041])。そして,第1〜第3コンポーネントに対してJPEG2000方式のY/C変換を施す。一方,アルファチャンネルのデータが含まれている第4コンポーネントには,何の処理も施さない(段落[0043])。このようにすることで,この文献に開示された装置は,アルファチャネルが劣化する事態を防止できる(段落[0062])。   In the apparatus disclosed in Japanese Patent Laid-Open No. 2003-116004, alpha data is also compressed. Therefore, Japanese Patent Laying-Open No. 2005-151207 (Patent Document 2 below) discloses a technique for preventing a situation where alpha data is compressed by JPEG compression for each component. That is, when the input image data has a total of three components of RGB, the fourth component is added to the image data. Then, alpha channel data attached to the input image is stored in the fourth component (paragraph [0041]). Then, JPEG 2000 Y / C conversion is performed on the first to third components. On the other hand, no processing is performed on the fourth component containing alpha channel data (paragraph [0043]). By doing so, the device disclosed in this document can prevent the alpha channel from deteriorating (paragraph [0062]).

上記の公報に開示された装置は,いずれもアルファデータを付加した新しいフォーマットを作成する。しかしながら,上記方法では,すでに作成され流通している画像圧縮伸張回路で,JPEG等のアルファデータを持たない画像フォーマットの処理装置を利用することはできない。
特開2003−116004号公報 特開2005−151207号公報
All of the devices disclosed in the above publications create a new format with alpha data added. However, in the above method, it is not possible to use a processing apparatus having an image format that does not have alpha data such as JPEG in an image compression / decompression circuit that has already been created and distributed.
JP 2003-116004 A JP 2005-151207 A

本発明は,アルファデータを持つことができない画像フォーマットの画像圧縮装置を用いて,アルファデータ付の画像を圧縮する画像圧縮装置を提供することを目的とする。また,本発明は,JPEGコアなどアルファデータ処理機能を持たない画像処理装置を用いても,簡単にアルファデータ処理を行うことができる画像データを得ることができる画像処理装置を提供することを目的とする。   An object of the present invention is to provide an image compression apparatus that compresses an image with alpha data using an image compression apparatus having an image format that cannot have alpha data. It is another object of the present invention to provide an image processing apparatus capable of obtaining image data that can easily perform alpha data processing even when an image processing apparatus having no alpha data processing function such as a JPEG core is used. And

本発明は,基本的には,画像データを圧縮する際に,所定の方式に則って色情報を符号化するとともに,アルファデータを色情報として扱う。そして,本来色情報を変換する方式を用いて,アルファデータを変換することで,アルファデータを持つことができない画像フォーマットの画像圧縮装置を用いて,アルファデータ付の画像を圧縮することができるという知見に基づくものである。   In the present invention, basically, when compressing image data, color information is encoded according to a predetermined method, and alpha data is handled as color information. And by converting alpha data using a method that originally converts color information, it is possible to compress an image with alpha data using an image compression device of an image format that cannot have alpha data. Based on knowledge.

すなわち,本発明の画像処理装置は,画像データ入力部(1)と;第1の変換部(3)と;第2の変換部(5)と;符号化部(7)と;出力部(9)とを有する。   That is, the image processing apparatus of the present invention includes an image data input unit (1); a first conversion unit (3); a second conversion unit (5); an encoding unit (7); 9).

画像データ入力部(1)には,画像に関するデータブロックが入力される。   A data block related to an image is input to the image data input unit (1).

第1の変換部(3)は,画像データ入力部(1)に入力されたデータブロックを,色データブロックと透明度データブロックとに分割し,色データブロックを所定の変換方式によって変換して,色データに関するマクロブロックを得る。   The first conversion unit (3) divides the data block input to the image data input unit (1) into a color data block and a transparency data block, converts the color data block by a predetermined conversion method, Get macroblock for color data.

第2の変換部(5)は,透明度データブロックを色データブロックとして扱って,第1の変換部(3)と同一の変換方式により,透明度データブロックを変換して,透明度データに関するマクロブロックを得る。   The second conversion unit (5) treats the transparency data block as a color data block, converts the transparency data block by the same conversion method as the first conversion unit (3), and converts the macro block related to the transparency data. obtain.

符号化部(7)は,色データに関するマクロブロックと,透明度データに関するマクロブロックとを,あわせてマクロブロックの組とし,マクロブロックの組を所定の符号化方式によって符号化する。   The encoding unit (7) combines the macroblock related to color data and the macroblock related to transparency data into a set of macroblocks, and encodes the set of macroblocks by a predetermined encoding method.

出力部(9)は,符号化部(7)により符号化されたデータを出力する。   The output unit (9) outputs the data encoded by the encoding unit (7).

本発明の画像処理装置は,アルファデータなどの透明度を表すデータを,色データの構造に変換して,その上で色データに施される符号化処理を施す。これにより,得られたデータは,アルファデータに関する情報を有しているにもかかわらず,色データを処理する装置により,復元できることとなる。   The image processing apparatus of the present invention converts transparency data such as alpha data into a color data structure, and then performs an encoding process applied to the color data. As a result, the obtained data can be restored by the device that processes the color data even though it has information about the alpha data.

画像処理装置の好ましいものは,マクロブロックの組が,色データに関するマクロブロックと,透明度データに関するマクロブロックとが,この順番に並ぶものである。また,別の好ましい,画像処理装置は,マクロブロックの組が,透明度データに関するマクロブロックの次に,色データに関するマクロブロックが来るように並ぶものである。   In a preferred image processing apparatus, a set of macroblocks includes a macroblock related to color data and a macroblock related to transparency data arranged in this order. In another preferred image processing apparatus, a set of macroblocks is arranged such that a macroblock related to color data comes after a macroblock related to transparency data.

このように,色データに関するマクロブロックと,透明度データに関するマクロブロックとの順番が一定であれば,装置を容易に実装できることとなる。   In this way, if the order of the macroblocks related to color data and the macroblocks related to transparency data is constant, the apparatus can be easily mounted.

本発明の画像処理装置として好ましいものは,複数のデータブロックを処理する場合,マクロブロックの組は,隣接するマクロブロックの組をまたいで隣接する2つマクロブロックが,両方とも色データに関するマクロブロックとなるか,又は,両方とも透明度データに関するマクロブロックとなるものである。   In the image processing apparatus of the present invention, when a plurality of data blocks are processed, a set of macroblocks includes two adjacent macroblocks straddling a set of adjacent macroblocks, both of which are macroblocks related to color data. Or both are macroblocks for transparency data.

上記のようなマクロブロックの組を形成して処理する場合,マクロブロックの組を得るための機構が複雑となる。しかし,JPEGなどでは,類似した情報が近くに存在した方がデータ処理の効率がよい。よって,この態様の画像処理装置は,効率よく画像を処理できることとなる。   When forming and processing a set of macroblocks as described above, the mechanism for obtaining the set of macroblocks is complicated. However, in JPEG or the like, data processing efficiency is better when similar information is present nearby. Therefore, the image processing apparatus of this aspect can process images efficiently.

本発明の画像処理装置として好ましいものは,JPEGコアを用いるものに関する。すなわち,先に説明したいずれかの画像処理装置において,第1の変換部(3),第2の変換部(5),及び符号化部(7)が以下のように機能する。   A preferable image processing apparatus according to the present invention relates to an apparatus using a JPEG core. That is, in any of the image processing apparatuses described above, the first conversion unit (3), the second conversion unit (5), and the encoding unit (7) function as follows.

第1の変換部(3)は,画像データ入力部(1)に入力されたデータブロックを,RGBデータを示すブロックとアルファデータブロックとに分割する。また,RGBデータを示すブロックを,RGBをYUVに変換する方式によって変換する。このようにして,色データに関するYUVマクロブロックを得る。   The first conversion unit (3) divides the data block input to the image data input unit (1) into a block indicating RGB data and an alpha data block. Further, the block indicating the RGB data is converted by a method of converting RGB into YUV. In this way, YUV macroblocks relating to color data are obtained.

第2の変換部(5)は,アルファデータブロックを色データブロックとして扱って,RGBをYUVに変換する方式によって変換する。アルファデータブロックを色データブロックとして扱うためには,アルファデータブロックを色データブロックのような構造に変換すればよい。このようにして,アルファデータに関するYUVマクロブロックを得る。   The second conversion unit (5) treats the alpha data block as a color data block and converts the RGB data into a YUV format. In order to handle an alpha data block as a color data block, the alpha data block may be converted into a structure like a color data block. In this way, a YUV macroblock for alpha data is obtained.

符号化部(7)は,色データに関するマクロブロックと,アルファデータデータに関するマクロブロックとを,あわせてマクロブロックの組とする。そして,マクロブロックの組をJPEG方式によって符号化する。   The encoding unit (7) combines a macro block related to color data and a macro block related to alpha data data into a set of macro blocks. Then, a set of macroblocks is encoded by the JPEG method.

この画像処理装置を用いれば,アルファデータを持たすことができないJPEGコアを用いても,容易にアルファデータを持った画像を処理できることとなる。   If this image processing apparatus is used, an image having alpha data can be easily processed even if a JPEG core that cannot have alpha data is used.

本発明の画像処理装置として好ましいものは,データ処理部(6)を,更に有する,上記いずれかの画像処理装置である。このデータ処理部(6)は,第2の変換部(5)により変換された,アルファデータブロックのうち,Yマクロデータに相当するものを残して,Uマクロデータ及びVマクロデータに相当するものを捨てる。さらに,データ処理部(6)は,第1の変換部(3)で変換されたYUVデータブロックと,第2の変換部(5)により変換された,アルファデータブロックのうち,Yマクロデータに相当するものとをあわせる。   A preferable image processing apparatus of the present invention is any one of the image processing apparatuses further including a data processing section (6). This data processing unit (6) corresponds to U macro data and V macro data, except for the alpha data block converted by the second conversion unit (5), corresponding to Y macro data. Throw away. Further, the data processing unit (6) converts the YUV data block converted by the first conversion unit (3) and the Y macro data out of the alpha data block converted by the second conversion unit (5). Combine with the equivalent.

このようなデータ処理部(6)を有することで,本発明の画像処理装置は,「アルファが付加されたJPEGデータ」を出力できることとなる。   By having such a data processing unit (6), the image processing apparatus of the present invention can output "JPEG data with added alpha".

本発明の画像処理装置として好ましいものは,符号化部(7)が以下のように機能するものである。すなわち,符号化部(7)は,「アルファが付加されたJPEGデータ」に所定のデータを付加することで,YUVデータブロックをRGBデータに符号化できる方式する。そして,符号化部(7)は,その上で,YUVデータブロックをRGBデータに符号化する方式で,前記所定のデータが付加された「アルファが付加されたJPEGデータ」を符号化する。   What is preferable as the image processing apparatus of the present invention is one in which the encoding unit (7) functions as follows. That is, the encoding unit (7) adds a predetermined data to the “JPEG data to which alpha is added” so that the YUV data block can be encoded into RGB data. Then, the encoding unit (7) encodes the “JPEG data to which alpha is added” to which the predetermined data is added by a method of encoding the YUV data block into RGB data.

このような符号化部(7)を有することで,本発明の画像処理装置は,「アルファが付加されたJPEGデータ」を容易にJPEG方式により符号化できることとなる。   By having such an encoding unit (7), the image processing apparatus of the present invention can easily encode “JPEG data with alpha added” by the JPEG method.

本発明によれば,アルファデータを持つことができない画像フォーマットに対して,アルファデータを付加する画像処理装置を提供できる。本発明によれば,JPEGコアなどアルファデータ処理機能を持たない画像処理装置を用いても,簡単にアルファデータ処理を行うことができる画像データを得ることができる画像処理装置を提供することができる。   According to the present invention, it is possible to provide an image processing apparatus that adds alpha data to an image format that cannot have alpha data. According to the present invention, it is possible to provide an image processing apparatus that can obtain image data that can easily perform alpha data processing even when an image processing apparatus that does not have an alpha data processing function, such as a JPEG core, is used. .

図1は,本発明の画像処理装置の基本構成を示すブロック図である。図1に示されるように,本発明の画像処理装置は,画像データ入力部(1)と;第1の変換部(3)と;第2の変換部(5)と;符号化部(7)と;出力部(9)とを有する。   FIG. 1 is a block diagram showing the basic configuration of the image processing apparatus of the present invention. As shown in FIG. 1, the image processing apparatus of the present invention includes an image data input unit (1); a first conversion unit (3); a second conversion unit (5); and an encoding unit (7 And an output section (9).

画像データ入力部(1)は,画像データが入力される部分である。この画像データは,通常RGBAデータを有する。そして,このRGBAデータは,R,B,B又はAを示すデータブロックを複数有する。   The image data input unit (1) is a part to which image data is input. This image data usually has RGBA data. This RGBA data has a plurality of data blocks indicating R, B, B, or A.

第1の変換部(3)は,画像データ入力部(1)に入力されたデータブロックを,色データブロックと透明度データブロックとに分割する。そして,色データブロックを所定の変換方式によって変換して,色データに関するマクロブロックを得る。   The first conversion unit (3) divides the data block input to the image data input unit (1) into a color data block and a transparency data block. Then, the color data block is converted by a predetermined conversion method to obtain a macro block related to the color data.

たとえば,画像データ入力部に入力される画像データは,RGBAデータ(データブロック)である。すると,第1の変換部は,この画像データを,色を示すRGBデータと,アルファデータを示すAデータとに分ける。このようにして,画像データが,色データブロックと透明度データブロックとに分割とに分割される。この場合,色データブロックは,たとえば,Rデータブロック,Gデータブロック,及びBデータブロックの3つのデータブロックを有する。一方,Aデータブロックは,たとえば,ひとつのデータブロックである。   For example, the image data input to the image data input unit is RGBA data (data block). Then, the first conversion unit divides the image data into RGB data indicating color and A data indicating alpha data. In this way, the image data is divided into color data blocks and transparency data blocks. In this case, the color data block has three data blocks, for example, an R data block, a G data block, and a B data block. On the other hand, the A data block is, for example, one data block.

色データブロックを変換する方式として,RGBデータをYUVデータに変換する方式があげられる。YUVデータとは,輝度(Y)と色差(UV)とを有する色データを意味する。JPEGやMPEGは,このYUVデータを圧縮する。JPEGによる圧縮は,JPEGコアを用いて行う。JPEGコアは,JPEGを行うための演算処理装置である。JPEGコアは,YUVデータしか扱えない。よって,RGBなどの画像データをJPEGで圧縮するためには,一度RGBデータをYUVデータに変換する。本発明においては,このような公知の変換方法を適宜用いることができる。   As a method for converting color data blocks, there is a method for converting RGB data into YUV data. YUV data means color data having luminance (Y) and color difference (UV). JPEG and MPEG compress this YUV data. JPEG compression is performed using a JPEG core. The JPEG core is an arithmetic processing device for performing JPEG. The JPEG core can only handle YUV data. Therefore, in order to compress image data such as RGB with JPEG, the RGB data is once converted into YUV data. In the present invention, such a known conversion method can be used as appropriate.

RGBデータをYUVデータに変換した場合,YUVマクロブロックを得ることができる。このYUVマクロブロックは,色データに関するマクロブロックの例である。なお,本明細書では,色(カラー)データから得られたY,U,Vマクロブロックを,それぞれYc,Uc,Vcのように表記する。また,本明細書では,色データに関するマクロブロックを,Mc又はMnc(nは番号)のように表記する。さらに,色データに関するYUVマクロブロックを,透明度データに関するマクロブロックと区別するために,YcUcVcブロックのように表記する。   When RGB data is converted into YUV data, a YUV macroblock can be obtained. This YUV macroblock is an example of a macroblock related to color data. In this specification, Y, U, and V macroblocks obtained from color data are expressed as Yc, Uc, and Vc, respectively. In this specification, a macroblock related to color data is expressed as Mc or Mnc (n is a number). Furthermore, in order to distinguish the YUV macroblock related to the color data from the macroblock related to the transparency data, it is expressed as a YcUcVc block.

なお,マクロブロックの構成は,画像を符号化(圧縮)する際に適当に決められる。このマクロブロックの構成(大きさなど)は,たとえば,画像処理装置が何らかの方法に基づいて自動的に選択するものであっても良いし,ユーザが設定した情報に基づいて選択されるものであってもよい。   The configuration of the macroblock is appropriately determined when the image is encoded (compressed). The configuration (size, etc.) of the macroblock may be selected automatically by the image processing apparatus based on some method or selected based on information set by the user. May be.

第2の変換部(5)は,透明度データブロックを色データブロックとして扱う。そして,第1の変換部(3)と同一の変換方式により,透明度データブロックを変換して,透明度データに関するマクロブロックを得る。   The second conversion unit (5) handles the transparency data block as a color data block. Then, the transparency data block is converted by the same conversion method as the first conversion unit (3) to obtain a macroblock related to the transparency data.

すなわち,第2の変換部は,色データに用いられる変換方式を,あえて透明度データブロックを変換するために用いるものである。よって,第2の変換部で変換された後の透明度データブロックは,意味のあるマクロブロックにはならない。しかし,このマクロブロックを復号化することで,透明度データを復号化することができる。しかも,透明度データブロックを変換した方式が,色データに用いられた変換方式と同じなので,色データを復号化する方法と同じ方法を用いて透明度データをも復号化できる。第1の変換部も第2の変換部も変換方式が同一である。よって,第1の変換部と第2の変換部とは,同一のハードウェアを用いて実装することができる。   That is, the second conversion unit uses the conversion method used for the color data in order to convert the transparency data block. Therefore, the transparency data block after being converted by the second conversion unit does not become a meaningful macroblock. However, the transparency data can be decoded by decoding the macroblock. Moreover, since the method of converting the transparency data block is the same as the conversion method used for the color data, the transparency data can be decoded using the same method as the method of decoding the color data. The first conversion unit and the second conversion unit have the same conversion method. Therefore, the first conversion unit and the second conversion unit can be mounted using the same hardware.

たとえば,入力画像がRGBAデータである場合,RGBデータは3ブロックである。一方,Aブロックは,1ブロックのみである。よって,このままでは,RGBをYUVに変換する方式を,Aブロックを変換するために用いることはできない。そこで,本発明の好ましい態様では,Aブロックを,白黒であるが画像情報として扱って,色を変換する方式を用いて変換する。たとえば,RGBブロックが置かれるそれぞれの位置に,Aブロックを置く。すなわち,AAAブロックを形成する。そして,RGBブロックにおかれたAAAブロックを変換する。この際,AAAブロックを,RGBデータをYUVデータに変換する方式に基づいて変換する。より詳しく説明すると,AAAブロックのうち最初のブロックについては,Rブロックとみなして,変換処理を行う。真ん中のブロックについては,Gブロックとみなして変換処理を行う。最後のブロックについては,Bブロックとみなして,変換処理を行う。この場合,Y,U及びVのそれぞれに対応するブロックが得られる。なお,Aブロックから作成したYのブロックを「Ya」のように表記する。本来は,たとえば,Yのブロックのみを有しているだけでも十分である。そこで,一度,UaやVaを捨てて出力してもよい。この場合,JPEGなどとの互換性を持たせるために,符号化処理の際にUaやVaに相当するデータを適宜付加すればよい。もっとも,Yaを残す替わりに,Ua又はVaのいずれかのみを残しても良い。なお,YcUcVcブロックに,Yaブロックを付加したものを,本明細書では「アルファが付加されたJPEGデータ」ともよぶ。すなわち,YcUcVcブロックは,JPEGデータとして,RGBブロックに相当する。さらに,Yaブロックは,JPEGと互換性を持たせることができるにもかかわらず,Aブロックに相当する。このことから,YcUcVcブロックに,Yaブロックを付加した,YcUcVcYaブロックを,「アルファが付加されたJPEGデータ」ともよぶのである。   For example, when the input image is RGBA data, the RGB data is 3 blocks. On the other hand, the A block is only one block. Therefore, in this state, the method of converting RGB into YUV cannot be used for converting the A block. Therefore, in a preferred embodiment of the present invention, the A block is black and white but is treated as image information and converted using a color conversion method. For example, an A block is placed at each position where an RGB block is placed. That is, an AAA block is formed. Then, the AAA block placed in the RGB block is converted. At this time, the AAA block is converted based on a method of converting RGB data into YUV data. More specifically, the first block of the AAA blocks is regarded as an R block and conversion processing is performed. The middle block is regarded as a G block and conversion processing is performed. The last block is regarded as a B block and a conversion process is performed. In this case, blocks corresponding to Y, U, and V are obtained. The Y block created from the A block is represented as “Ya”. Originally, for example, it is sufficient to have only Y blocks. Therefore, Ua and Va may be discarded and output once. In this case, in order to have compatibility with JPEG or the like, data corresponding to Ua or Va may be appropriately added during the encoding process. However, only Ua or Va may be left instead of leaving Ya. In this specification, the YcUcVc block with the Ya block added is also referred to as “JPEG data with alpha added”. That is, the YcUcVc block corresponds to an RGB block as JPEG data. Furthermore, the Ya block corresponds to the A block, although it can be compatible with JPEG. For this reason, the YcUcVcYa block obtained by adding the Ya block to the YcUcVc block is also referred to as “JPEG data to which alpha is added”.

しかしながら,JPEGなどとの互換性を維持するために,YcUcVcブロックが得られた後に,Uのマクロブロック(Ua)やVのマクロブロック(Va)も捨てずに残していてもよい。また,なお,本明細書では,透明度データに関するマクロブロックを,Ma又はMna(nは番号)のように表記する。また,透明度データに関するYUVマクロブロックを,YaUaVaブロックともよぶ。   However, in order to maintain compatibility with JPEG and the like, after the YcUcVc block is obtained, the U macroblock (Ua) and the V macroblock (Va) may be left without being discarded. In addition, in this specification, a macroblock related to transparency data is expressed as Ma or Mna (n is a number). Further, the YUV macro block relating to the transparency data is also referred to as a YaUaVa block.

このようにして,透明度データブロックを色データブロックとして扱って,第1の変換部(3)と同一の変換方式により,透明度データブロックを変換して,透明度データに関するマクロブロックを得ることができる。   In this way, the transparency data block is treated as a color data block, and the transparency data block is converted by the same conversion method as that of the first conversion unit (3), thereby obtaining a macro block related to the transparency data.

なお,本発明の画像処理装置の好ましい態様は,データ処理部(6)を,更に有する画像処理装置に関する。このデータ処理部(6)は,第2の変換部(5)により変換された,アルファデータブロックのうち,Yマクロデータに相当するものを残して,Uマクロデータ及びVマクロデータに相当するものを捨てる。そして,この,データ処理部(6)は,第1の変換部(3)で変換されたYUVデータブロックと,第2の変換部(5)により変換された,アルファデータブロックのうち,Yマクロデータに相当するものとをあわせる。   In addition, the preferable aspect of the image processing apparatus of this invention is related with the image processing apparatus which further has a data processing part (6). This data processing unit (6) corresponds to U macro data and V macro data, except for the alpha data block converted by the second conversion unit (5), corresponding to Y macro data. Throw away. Then, the data processing unit (6) includes the Y macro among the YUV data block converted by the first conversion unit (3) and the alpha data block converted by the second conversion unit (5). Combine with the data equivalent.

このデータ処理部(6)は,具体的には,先に説明したYcUcVcYaブロックを得るものである。このようなデータ処理部(6)を有する画像処理装置は,RGBフォーマットにしたがって,RGBに関するデータにアルファに関するデータを持たせたものである「アルファが付加されたJPEGデータ」を得ることができる。   Specifically, the data processing unit (6) obtains the YcUcVcYa block described above. The image processing apparatus having such a data processing unit (6) can obtain “JPEG data with alpha added”, which is data related to RGB and data related to alpha according to the RGB format.

符号化部(7)は,色データに関するマクロブロックと,透明度データに関するマクロブロックとを,あわせてマクロブロックの組とする。そして,マクロブロックの組を所定の符号化方式によって符号化する。   The encoding unit (7) combines the macro block related to color data and the macro block related to transparency data into a set of macro blocks. Then, the set of macroblocks is encoded by a predetermined encoding method.

色データに関するマクロブロックと,透明度データに関するマクロブロックとは,同じ変換方式で変換されて得られるマクロブロックである。よって,これらのマクロブロックの組は,同じ符号化方式により符号化できる。符号化方式として,JPEG,MPEGなど公知の符号化方式があげられる。本発明は,アルファデータを持たせられない符号化方式にアルファデータを持たせることに大きな技術的意義がある。よって,本発明における符号化方式として,扱うデータにアルファデータを含まない符号化方式を好ましく用いることができる。このような観点から,本発明の符号化方式として,好ましい方式は,JPEG方式である。   The macro block related to color data and the macro block related to transparency data are macro blocks obtained by conversion using the same conversion method. Therefore, these sets of macroblocks can be encoded by the same encoding method. Examples of the encoding method include known encoding methods such as JPEG and MPEG. The present invention has great technical significance in having alpha data in an encoding method that cannot have alpha data. Therefore, an encoding method that does not include alpha data in the data to be handled can be preferably used as the encoding method in the present invention. From this point of view, the preferred method as the encoding method of the present invention is the JPEG method.

このマクロブロックの組は,RGBマクロブロックを記憶するバッファの2倍の容量のバッファを用いることで一時的に記憶できる。よって,この態様の画像処理装置は,RGBをYUVに変換する公知の装置の2倍のバッファを持たせるだけで,アルファデータをも含めて符号化することができることとなる。   This set of macroblocks can be temporarily stored by using a buffer having a capacity twice that of a buffer for storing RGB macroblocks. Therefore, the image processing apparatus of this aspect can perform encoding including alpha data only by having a buffer twice that of a known apparatus that converts RGB into YUV.

マクロブロックの組は,色データに関するマクロブロックと,透明度データに関するマクロブロックとが,この順番で並んだものがあげられる。また,マクロブロックの組は,透明度データに関するマクロブロックの次に,色データに関するマクロブロックが来るように並ぶものであってもよい。このように,色データに関するマクロブロックと,透明度データに関するマクロブロックとの順番が一定であれば,装置を容易に実装できることとなる。具体的には,所定の順番に基づいて,Mc又はMaを出力すればよい。   A group of macroblocks includes a macroblock related to color data and a macroblock related to transparency data arranged in this order. The set of macro blocks may be arranged such that the macro block related to color data comes next to the macro block related to transparency data. In this way, if the order of the macroblocks related to color data and the macroblocks related to transparency data is constant, the apparatus can be easily mounted. Specifically, Mc or Ma may be output based on a predetermined order.

通常画像は,複数のデータブロックを有している。本発明では,基本的に,データブロックごとに,先に説明した処理を行い,データブロック(RGBブロック)ごとに,色データに関するマクロブロック(Mc,YcUcVcブロック)及び透明度データに関するマクロブロック(Ma,YaUaVaブロック)を得る。色データに関するマクロブロックと,透明度データに関するマクロブロックとが,この順番で並んだものは,Mc,Ma,Mc,Ma,Mc,Ma,Mc,Ma,Mc,Ma・・・のように続くものである。なお,たとえば,Mc及びMaは,初めのデータブロックに基づくマクロブロックである。Mc及びMaは,合わさって,ひとつのマクロブロックの組となる。 A normal image has a plurality of data blocks. In the present invention, basically, the processing described above is performed for each data block, and for each data block (RGB block), a macro block related to color data (Mc, YcUcVc block) and a macro block related to transparency data (Ma, YaUaVa block). A macro block related to color data and a macro block related to transparency data are arranged in this order. M 1 c, M 1 a, M 2 c, M 2 a, M 3 c, M 3 a, M 4 c , M 4 a, M 5 c, M 5 a, and so on. For example, M 1 c and M 1 a are macroblocks based on the first data block. M 1 c and M 1 a are combined into one macroblock set.

なお,マクロブロックの組として,複数のデータブロックを処理する場合,隣接するマクロブロックの組をまたいで隣接する2つマクロブロックが,両方とも色データに関するマクロブロックとなるか,又は両方とも透明度データに関するマクロブロックとなるものが好ましい。   When a plurality of data blocks are processed as a set of macroblocks, two adjacent macroblocks straddling the set of adjacent macroblocks are both macroblocks related to color data, or both are transparency data. What becomes the macroblock regarding is preferable.

ここでは,簡単のため,マクロブロックの組を,[Mc,Ma]のように表記する。すると,先に説明した,マクロブロックの組は,[Mc,Ma],[Mc,Ma],[Mc,Ma],[Mc,Ma],[Mc,Ma]・・・のようになる。この場合隣接するマクロブロックの組をまたいで隣接する2つのマクロブロックは,色データに関するマクロブロック(Mc)と透明度データに関するマクロブロック(Ma)とを含むことになる。たとえば,第1のマクロブロックの組と第2のマクロブロックの組は,[Mc,Ma],[Mc,Ma]で表されている。この場合,隣接するマクロブロックの組をまたいで隣接する2つマクロブロックは,Ma(透明度データに関するマクロブロック)及び,Mc(色データに関するマクロブロック)だからである。すなわち,この態様の画像処理装置は,マクロブロックの組が,たとえば,[Mc,Ma],[Ma,Mc],[Mc,Ma],[Ma,Mc],[Mc,Ma]・・・となるように処理する。また,この態様の画像処理装置は,マクロブロックの組が,たとえば,[Ma,Mc],[Mc,Ma],[Ma,Mc],[Mc,Ma],[Ma,Mc]・・・となるように処理してもよい。この場合,隣接するマクロブロックの組をまたいで隣接する2つマクロブロックが,両方とも色データに関するマクロブロックとなるか,又は両方とも透明度データに関するマクロブロックとなる Here, for simplicity, a set of macroblocks is expressed as [M 1 c, M 1 a]. Then, the set of macroblocks described above is [M 1 c, M 1 a], [M 2 c, M 2 a], [M 3 c, M 3 a], [M 4 c, M 4. a], [M 5 c, M 5 a]... In this case, two adjacent macroblocks across the set of adjacent macroblocks include a macroblock (Mc) for color data and a macroblock (Ma) for transparency data. For example, the set of the first macroblock and the set of the second macroblock are represented by [M 1 c, M 1 a], [M 2 c, M 2 a]. In this case, two macroblocks that are adjacent to each other across the set of adjacent macroblocks are M 1 a (macroblock related to transparency data) and M 2 c (macroblock related to color data). That is, in the image processing apparatus of this aspect, the set of macroblocks is, for example, [M 1 c, M 1 a], [M 2 a, M 2 c], [M 3 c, M 3 a], [M 4 a, M 4 c], [M 5 c, M 5 a]... In the image processing apparatus of this aspect, the set of macroblocks is, for example, [M 1 a, M 1 c], [M 2 c, M 2 a], [M 3 a, M 3 c], [M 4 c, M 4 a], [M 5 a, M 5 c], and so on. In this case, two adjacent macroblocks across adjacent macroblock pairs are both macroblocks related to color data, or both are macroblocks related to transparency data.

上記のようなマクロブロックの組を形成して処理する場合,マクロブロックの組を得るための機構が複雑となる。しかし,JPEGなどでは,類似した情報が近くに存在した方がデータ処理の効率がよい。よって,この態様の画像処理装置は,効率よく画像を処理できることとなる。   When forming and processing a set of macroblocks as described above, the mechanism for obtaining the set of macroblocks is complicated. However, in JPEG or the like, data processing efficiency is better when similar information is present nearby. Therefore, the image processing apparatus of this aspect can process images efficiently.

なお,JPEG圧縮などの符号化処理を施したYUVデータは,JPEGフォーマットのRGBデータとして出力される。   Note that YUV data subjected to encoding processing such as JPEG compression is output as RGB data in JPEG format.

次に,符号化部(7)が,「アルファが付加されたJPEGデータ」を符号化する場合について説明する。「アルファが付加されたJPEGデータ」は,YcUcVcYaブロックを有するデータである。このデータのうち,YcUcVcブロックに関する部分は,JPEGコアにより,RGBデータへと変換できる。一方,Yaブロックは,たとえば,1ブロックであるから,JPEGコアにより変換できない。そこで,このような場合,「アルファが付加されたJPEGデータ」に所定のデータを付加する。このようにして,たとえば,RGBデータと同様のデータ構成を有するデータへと変換する。具体的には,Uaブロック及びVaブロックに相当するデータ構造にすべて0が入れられたものを用意して,Yaフロックと付加すればよい。このようにすれば,Yaブロックを,JPEGコアによっても変換できる情報に変換できる。   Next, a case where the encoding unit (7) encodes “JPEG data with added alpha” will be described. “JPEG data with alpha added” is data having a YcUcVcYa block. Of this data, the portion related to the YcUcVc block can be converted into RGB data by the JPEG core. On the other hand, since the Ya block is, for example, one block, it cannot be converted by the JPEG core. Therefore, in such a case, predetermined data is added to “JPEG data to which alpha is added”. In this way, for example, the data is converted into data having the same data configuration as the RGB data. Specifically, a data structure corresponding to the Ua block and Va block with all 0s may be prepared and added to the Ya floc. In this way, the Ya block can be converted into information that can also be converted by the JPEG core.

出力部(9)は,符号化部(7)により符号化されたデータを出力する。   The output unit (9) outputs the data encoded by the encoding unit (7).

次に,蝶の画像データが入力された場合を例にして本発明を説明する。この蝶の画像データは,アルファデータと,RGBなどの色データとを含む。そして,アルファデータを用いて,透明度画像を得る。図2は,蝶の画像データから抽出したアルファデータを用いた透明度画像である。なお,図2では,透明度画像が,2値とされている。すなわち,透明度が高い部分が黒で表され,透明度が低い部分が白で表されている。しかしながら,本発明はそれに限定されるものではない。すなわち,アルファデータに基づいて多階調のグレーデータを得ても良い。図3は,蝶の色画像を示す図である。   Next, the present invention will be described by taking as an example a case where butterfly image data is input. This butterfly image data includes alpha data and color data such as RGB. Then, a transparency image is obtained using the alpha data. FIG. 2 is a transparency image using alpha data extracted from butterfly image data. In FIG. 2, the transparency image is binary. That is, a portion with high transparency is represented in black, and a portion with low transparency is represented in white. However, the present invention is not limited to this. That is, multi-tone gray data may be obtained based on alpha data. FIG. 3 is a diagram showing a color image of a butterfly.

図4は,透明度画像と,色画像とを交互に配置したものを示す図である。なお,図4に示される画像データは,画像全体をブロックに分けて,ブロックごとに色画像と透明度画像との組を有している。本発明は,図4に示される縞々の画像データを,あえてひとつの色データと判断して,JPEGなどの変換を施せばよい。たとえば,元の画像が128×128bitのRGBA画像だったとすると,本発明では,あたかも256×128bitのRGB画像であったかのようにみなして,JPEG圧縮を行うこととなる。もっとも,図4は,本発明を分かりやすく説明するためのものであり,好ましくは,画像全体ではなく,マクロブロックの組ごとに符号化処理などが行われる。   FIG. 4 is a diagram illustrating an example in which a transparency image and a color image are alternately arranged. The image data shown in FIG. 4 divides the entire image into blocks, and each block has a set of a color image and a transparency image. In the present invention, the image data of the stripes shown in FIG. 4 may be determined as one color data and converted by JPEG or the like. For example, if the original image is a 128 × 128 bit RGBA image, the present invention assumes that the original image is a 256 × 128 bit RGB image and performs JPEG compression. However, FIG. 4 is for explaining the present invention in an easy-to-understand manner. Preferably, encoding processing or the like is performed for each set of macroblocks, not the entire image.

次に,本発明により変換処理を施された画像データを復号化する工程の例を説明する。なお,以下では,JPEG方式に従って符号化されたデータを復号化する場合について説明する。   Next, an example of a process for decoding image data that has been subjected to conversion processing according to the present invention will be described. In the following, a case where data encoded according to the JPEG method is decoded will be described.

YaUaVaブロックを,JPEGコアを用いてカラーに変換する。すると,符号化前のRGBデータブロックを得ることができる。YaUaVaブロックを,JPEGコアを用いて変換する。すると,RGBデータに相当するものとして,Aデータが出力される。このAデータは,3つ続けて出力されるはずである。このうち最初に出力されるデータをAデータとして取り出せばよい。このようにして,RGBAデータを復元できることとなる。   The YaUaVa block is converted to color using the JPEG core. Then, an RGB data block before encoding can be obtained. The YaUaVa block is converted using the JPEG core. Then, the A data is output as corresponding to the RGB data. The three A data should be output in succession. Of these, the data output first may be taken out as A data. In this way, RGBA data can be restored.

なお,YUVマクロブロックは,何通りかの異なる構造がある。そこで,以下に,RGBをYUVに変換する方法により変換されるYUVマクロブロックも様々な構造を有する。以下では,RGBAデータが,いくつかの種類のYUVマクロブロックに変換される場合について説明する。   The YUV macroblock has several different structures. Therefore, hereinafter, YUV macroblocks converted by the method of converting RGB to YUV also have various structures. Hereinafter, a case where RGBA data is converted into several types of YUV macroblocks will be described.

次に,図面に基づいて,本発明の画像処理方法の例を説明する。なお,以下の例では,JPEG方式に基づいて本発明の画像処理方法の例を説明する。しかしながら,本発明は,JPEG方式に限られず,公知の符号化方式に用いることができる。   Next, an example of the image processing method of the present invention will be described based on the drawings. In the following example, an example of the image processing method of the present invention will be described based on the JPEG method. However, the present invention is not limited to the JPEG system and can be used for a known encoding system.

図5は,本発明の処理の例を示すフローチャートである。図中Sは,ステップを意味する。まず,RGBAを有する画像が本発明の画像処理装置へ入力される(S201)。   FIG. 5 is a flowchart showing an example of processing of the present invention. In the figure, S means a step. First, an image having RGBA is input to the image processing apparatus of the present invention (S201).

次に,RGBAを,RGBとAとに分割し,そのうちRGBをYUVデータへと変換する。このようにして,YcUcVcデータを得る(S202)。   Next, RGBA is divided into RGB and A, and RGB is converted into YUV data. In this way, YcUcVc data is obtained (S202).

一方,Aデータを,RGBデータと同様の構造を有するものに変換する。具体的には,あいているデータ位置に0を付加すればよい。そして,RGBをYUVデータへ変換する方式に基づいて,0が付加されたAデータを変換する。このようにして,RGBAから分割されたAを用いてYaUaVaデータを得る(S203)。   On the other hand, A data is converted into data having the same structure as RGB data. Specifically, 0 may be added to the data position that is open. Then, based on a method of converting RGB into YUV data, A data with 0 added is converted. In this way, YaUaVa data is obtained using A divided from RGBA (S203).

次に,ステップ202で得られたYcUcVcデータと,ステップ203で得られたYaUaVaデータをあわせて,YcUcVcYaUaVaデータとする(S204)。   Next, the YcUcVc data obtained in step 202 and the YaUaVa data obtained in step 203 are combined into YcUcVcYaUaVa data (S204).

ステップ204で得られたYcUcVcYaUaVaデータをJPEG方式により符号化する。すると,YcUcVcデータは,JPEG方式により圧縮されたRGBデータとなる。一方,YaUaVaデータは,JPEG方式により圧縮されたAデータとなる。このようにして,JPEG方式により圧縮されたRGBAデータを得ることができる(S205)。   The YcUcVcYaUaVa data obtained in step 204 is encoded by the JPEG method. Then, the YcUcVc data becomes RGB data compressed by the JPEG method. On the other hand, YaUaVa data is A data compressed by the JPEG method. In this way, RGBA data compressed by the JPEG method can be obtained (S205).

ステップ201〜ステップ205を画像に含まれる全てのデータブロックについて繰り返すことで,ある画像をJPEG方式により圧縮でき,しかもAデータを持たせることができる。   By repeating steps 201 to 205 for all the data blocks included in the image, a certain image can be compressed by the JPEG method, and A data can be provided.

図6は,本発明の処理の例のうち,アルファが付加されたJPEGデータを用いるものを示すフローチャートである。図中Sは,ステップを意味する。まず,RGBAを有する画像が本発明の画像処理装置へ入力される(S201)。   FIG. 6 is a flowchart showing an example of processing according to the present invention using JPEG data to which alpha is added. In the figure, S means a step. First, an image having RGBA is input to the image processing apparatus of the present invention (S201).

次に,RGBAを,RGBとAとに分割し,そのうちRGBをYUVデータへと変換する。このようにして,YcUcVcデータを得る(S202)。   Next, RGBA is divided into RGB and A, and RGB is converted into YUV data. In this way, YcUcVc data is obtained (S202).

一方,Aデータを,RGBデータと同様の構造を有するものに変換する。具体的には,あいているデータ位置に0を付加すればよい。そして,RGBをYUVデータへ変換する方式に基づいて,0が付加されたAデータを変換する。このようにして,RGBAから分割されたAを用いてYaUaVaデータを得る(S203)。   On the other hand, A data is converted into data having the same structure as RGB data. Specifically, 0 may be added to the data position that is open. Then, based on a method of converting RGB into YUV data, A data with 0 added is converted. In this way, YaUaVa data is obtained using A divided from RGBA (S203).

次に,ステップ203で得られたYaUaVaデータから,Uaデータ及びVaデータをすてる。このようにして,Yaデータを得る(S204)。   Next, Ua data and Va data are obtained from the YaUaVa data obtained in step 203. In this way, Ya data is obtained (S204).

次に,ステップ202で得られたYcUcVcデータと,ステップ204で得られたYaデータをあわせて,YcUcVcYaデータとする(S205)。これは,アルファが付加されたJPEGデータともよばれる。このアルファが付加されたJPEGデータは,RGBAデータと同じ構造を持つことができるため,容易に扱うことができる。   Next, the YcUcVc data obtained in step 202 and the Ya data obtained in step 204 are combined into YcUcVcYa data (S205). This is also called JPEG data to which alpha is added. Since the JPEG data to which alpha is added can have the same structure as RGBA data, it can be easily handled.

一方,ステップ205で得られたYcUcVcYaデータは,JPEGコアにて符号化できる構造と異なる。そこで,YcUcVcYaデータに,Ua’データ及びVa’データを付加する。このUa’データ及びVa’データは,たとえば,Uaデータ及びVaデータに相当する構造に,すべて0がおかれたデータがあげられる。このようにして,YcUcVcYaUa’Va’データを得る(S206)。   On the other hand, the YcUcVcYa data obtained in step 205 is different from the structure that can be encoded by the JPEG core. Therefore, Ua 'data and Va' data are added to YcUcVcYa data. Examples of the Ua 'data and Va' data include data in which all zeros are placed in a structure corresponding to Ua data and Va data. In this way, YcUcVcYaUa'Va 'data is obtained (S206).

ステップ206で得られたYcUcVcYaUa’Va’データをJPEG方式により符号化する。すると,YcUcVcデータは,JPEG方式により圧縮されたRGBデータとなる。一方,YaUa’Va’データは,JPEG方式により圧縮されたAデータとなる。なお,YaUa’Va’データは,JPEG方式により符号化すると,Aデータに相当するものが3つ出力される。そのうち最初に出力されるものをAデータとすればよい。このようにして,JPEG方式により圧縮されたRGBAデータを得ることができる(S207)。     The YcUcVcYaUa'Va 'data obtained in step 206 is encoded by the JPEG method. Then, the YcUcVc data becomes RGB data compressed by the JPEG method. On the other hand, the YaUa′Va ′ data is A data compressed by the JPEG method. If the YaUa'Va 'data is encoded by the JPEG method, three pieces corresponding to the A data are output. Of these, the first output may be A data. In this way, RGBA data compressed by the JPEG method can be obtained (S207).

ステップ201〜ステップ207を画像に含まれる全てのデータブロックについて繰り返すことで,ある画像をJPEG方式により圧縮でき,しかもAデータを持たせることができる。   By repeating steps 201 to 207 for all the data blocks included in the image, a certain image can be compressed by the JPEG method, and A data can be provided.

実施例1は,YUV444モードに関する。YUV444モードは,4個のYブロックと1個のUブロックと1個のVブロックで,1個のマクロブロックを構成する。マクロブロックは,大きさが8x8ピクセルからなる。もとの画像データブロックがRGBAブロックとする。そして,RGBブロックから,YcUcVcマクロブロックを得る。一方,Aブロックから,YaUaVaマクロブロックを得る。その上で,UaVaマクロブロックを捨て,YcUcVcYaマクロブロックを出力する。なお,マクロブロックをJPEG圧縮してもよい。そして,YcUcVcマクロブロックをRGBに相当するブロックに変換し,YaマクロブロックをAに相当するブロックに変換して出力するので,RGBAの8×8ピクセルを出力することに相当する。このようにしてアルファが付加されたJPEGデータを得ることができる。   Example 1 relates to the YUV444 mode. In the YUV444 mode, one macroblock is composed of four Y blocks, one U block, and one V block. A macroblock consists of 8x8 pixels. The original image data block is an RGBA block. Then, a YcUcVc macroblock is obtained from the RGB block. On the other hand, a YaUaVa macroblock is obtained from the A block. After that, the UaVa macroblock is discarded and the YcUcVcYa macroblock is output. The macroblock may be JPEG compressed. Since the YcUcVc macroblock is converted into a block corresponding to RGB and the Ya macroblock is converted into a block corresponding to A and output, this corresponds to outputting 8 × 8 pixels of RGBA. In this way, JPEG data to which alpha is added can be obtained.

次に,上記のデータを符号化する際について説明する。上記のYcUcVcYaマクロブロックを,YcUcVcYaUaVaマクロブロックに変換する。具体的には,Uaマクロブロック及びVaマクロブロックとして,0が記述されたマクロブロックを用意する。そして,この0が記述されたマクロブロックを,YcUcVcYaマクロブロックに付加する。このようにして,YcUcVcYaUaVaマクロブロックを得ることができる。このうちYcUcVcマクロブロックは,たとえばJPEGコアにより,RGBに変換される。一方,YaUaVaマクロブロックは,たとえばJPEGコアにより,Aに変換される。   Next, the case where the above data is encoded will be described. The YcUcVcYa macroblock is converted into a YcUcVcYaUaVa macroblock. Specifically, macroblocks in which 0 is described are prepared as Ua macroblocks and Va macroblocks. Then, the macro block in which 0 is described is added to the YcUcVcYa macro block. In this way, a YcUcVcYaUaVa macroblock can be obtained. Among these, the YcUcVc macroblock is converted into RGB by, for example, a JPEG core. On the other hand, the YaUaVa macroblock is converted to A by the JPEG core, for example.

実施例2は,YUV422モードに関する。YUV422は,2個のYブロック,1個のUブロック,及び1個のVブロックを有するマクロブロックである。このマクロブロックは,大きさが16×8ピクセルからなる。この場合も,上記と同様にして,アルファが付加されたJPEGデータを得たうえで,JPEG圧縮を行うことができる。つまり,YUV422モードでは,Yブロックが2ブロックであるほかは,YUV444モードと同様に処理できる。   Example 2 relates to the YUV422 mode. The YUV 422 is a macroblock having two Y blocks, one U block, and one V block. This macroblock consists of 16 × 8 pixels. Also in this case, JPEG compression can be performed after obtaining JPEG data to which alpha is added in the same manner as described above. That is, in the YUV422 mode, processing can be performed in the same manner as in the YUV444 mode except that the Y block is two blocks.

実施例3は,YUV420モードに関する。YUV420マクロブロックは,4個のYブロック,1個のUブロック及び1個のVブロックを有するマクロブロックである。このマクロブロックは,大きさが16×16ピクセルからなる。この場合も,上記と同様にして,アルファが付加されたJPEGデータを得たうえで,JPEG圧縮を行うことができる。つまり,YUV420モードでは,Yブロックが4ブロックであるほかは,YUV444モードと同様に処理できる。   Example 3 relates to the YUV420 mode. The YUV420 macroblock is a macroblock having four Y blocks, one U block, and one V block. This macroblock is composed of 16 × 16 pixels. Also in this case, JPEG compression can be performed after obtaining JPEG data to which alpha is added in the same manner as described above. That is, in the YUV420 mode, processing can be performed in the same manner as in the YUV444 mode except that the Y block is 4 blocks.

本発明は,画像処理の分野などで好適に用いることができる。   The present invention can be suitably used in the field of image processing.

図1は,本発明の画像処理装置の基本構成を示すブロック図である。FIG. 1 is a block diagram showing the basic configuration of the image processing apparatus of the present invention. 図2は,蝶の画像データから抽出したアルファデータを用いた透明度画像である。FIG. 2 is a transparency image using alpha data extracted from butterfly image data. 図3は,蝶の色画像を示す図である。FIG. 3 is a diagram showing a color image of a butterfly. 図4は,透明度画像と,色画像とを交互に配置したものを示す図である。FIG. 4 is a diagram illustrating an example in which a transparency image and a color image are alternately arranged. 図5は,本発明の処理の例を示すフローチャートである。FIG. 5 is a flowchart showing an example of processing of the present invention. 図6は,本発明の処理の例のうち,アルファが付加されたJPEGデータを用いるものを示すフローチャートである。FIG. 6 is a flowchart showing an example of processing according to the present invention using JPEG data to which alpha is added.

符号の説明Explanation of symbols

1 画像データ入力部; 3 第1の変換部; 5 第2の変換部; 6 データ処理部; 7 符号化部; 9 出力部   DESCRIPTION OF SYMBOLS 1 Image data input part; 3 1st conversion part; 5 2nd conversion part; 6 Data processing part; 7 Encoding part; 9 Output part

Claims (6)

画像に関するデータブロックが入力される画像データ入力部(1)と;

前記画像データ入力部(1)に入力された前記データブロックを,色データブロックと透明度データブロックとに分割し,前記色データブロックを所定の変換方式によって変換して,色データに関するマクロブロックを得る第1の変換部(3)と;

前記透明度データブロックを色データブロックとして扱って,前記第1の変換部(3)と同一の変換方式により,前記透明度データブロックを変換して,透明度データに関するマクロブロックを得る第2の変換部(5)と;

前記色データに関するマクロブロックと,前記透明度データに関するマクロブロックとを,あわせてマクロブロックの組とし,前記マクロブロックの組を所定の符号化方式によって符号化する符号化部(7)と;

前記符号化部(7)により符号化されたデータを出力する出力部(9)と;

を有する,画像処理装置。
An image data input unit (1) to which data blocks relating to images are input;

The data block input to the image data input unit (1) is divided into a color data block and a transparency data block, and the color data block is converted by a predetermined conversion method to obtain a macro block related to color data. A first converter (3);

A second conversion unit that treats the transparency data block as a color data block, converts the transparency data block by the same conversion method as the first conversion unit (3), and obtains a macroblock related to the transparency data ( 5) and;

An encoding unit (7) for combining the macroblock related to the color data and the macroblock related to the transparency data into a set of macroblocks, and encoding the set of macroblocks by a predetermined encoding method;

An output unit (9) for outputting the data encoded by the encoding unit (7);

An image processing apparatus.
前記マクロブロックの組は,
前記色データに関するマクロブロックと,前記透明度データに関するマクロブロックとが,この順番に並ぶか,又は,
前記透明度データに関するマクロブロックの次に,前記色データに関するマクロブロックが来るように並ぶ,
請求項1に記載の画像処理装置。
The set of macroblocks is
Macro blocks related to the color data and macro blocks related to the transparency data are arranged in this order, or
The macroblock related to the transparency data is arranged next to the macroblock related to the color data.
The image processing apparatus according to claim 1.
前記マクロブロックの組は,
複数のデータブロックを処理する場合,
隣接するマクロブロックの組をまたいで隣接する2つマクロブロックが,両方とも色データに関するマクロブロックとなるか,又は,両方とも透明度データに関するマクロブロックとなる請求項1に記載の画像処理装置。
The set of macroblocks is
When processing multiple data blocks:
The image processing apparatus according to claim 1, wherein two adjacent macroblocks straddling a set of adjacent macroblocks are both macroblocks related to color data, or both are macroblocks related to transparency data.
前記色データブロックは,RGBデータを示すブロックであり,
前記透明度データブロックは,アルファデータを示すブロックであり,

前記第1の変換部(3)における所定の変換方式は,RGBデータをYUVデータブロックに変換する方式であり,

前記第2の変換部(5)は,
RGBデータをYUVデータに変換する方式を行うに当たりRGBブロックが置かれるそれぞれの位置に,前記アルファデータを示すブロックを置き,
前記RGBブロックにおかれたアルファデータブロックを,RGBデータをYUVデータに変換する方式に基づいて変換することで,
前記透明度データブロックを色データブロックとして扱って,前記第1の変換部(3)と同一の変換方式により,前記透明度データブロックを変換して,透明度データに関するマクロブロックを得るものであり,

前記符号化部(7)による所定の符号化方式は,
JPEG方式である,

請求項1又は請求項3に記載の画像処理装置。
The color data block is a block indicating RGB data,
The transparency data block is a block indicating alpha data,

The predetermined conversion method in the first conversion unit (3) is a method of converting RGB data into YUV data blocks,

The second converter (5)
In performing a method of converting RGB data into YUV data, a block indicating the alpha data is placed at each position where the RGB block is placed,
By converting the alpha data block placed in the RGB block based on a method of converting RGB data into YUV data,
The transparency data block is treated as a color data block, and the transparency data block is converted by the same conversion method as the first conversion unit (3) to obtain a macro block related to transparency data.

The predetermined encoding method by the encoding unit (7) is:
JPEG format

The image processing apparatus according to claim 1.
前記第2の変換部(5)により変換された,アルファデータブロックのうち,Yマクロデータに相当するものを残して,Uマクロデータ及びVマクロデータに相当するものを捨て,
前記第1の変換部(3)で変換されたYUVデータブロックと,前記第2の変換部(5)により変換された,アルファデータブロックのうち,Yマクロデータに相当するものとをあわせる,
データ処理部(6)を,更に有する,
請求項4に記載の画像処理装置。
Of the alpha data blocks converted by the second conversion unit (5), those corresponding to Y macro data are left out and those corresponding to U macro data and V macro data are discarded.
The YUV data block converted by the first conversion unit (3) and the alpha data block converted by the second conversion unit (5) are combined with one corresponding to Y macro data.
A data processing unit (6);
The image processing apparatus according to claim 4.
前記符号化部(7)は,
前記データ処理部(6)で得られた情報を,「アルファが付加されたJPEGデータ」としたときに,前記「アルファが付加されたJPEGデータ」に所定のデータを付加して,YUVデータブロックをRGBデータに符号化できる方式とし,
その上で,YUVデータブロックをRGBデータに符号化する方式で,前記所定のデータが付加された「アルファが付加されたJPEGデータ」を符号化する,
請求項5に記載の画像処理装置。
The encoding unit (7)
When the information obtained by the data processing unit (6) is “JPEG data to which alpha is added”, predetermined data is added to the “JPEG data to which alpha is added”, and a YUV data block Can be encoded into RGB data,
Then, the “YPEG data block with alpha” added with the predetermined data is encoded using a method of encoding the YUV data block into RGB data.
The image processing apparatus according to claim 5.
JP2008029978A 2008-02-12 2008-02-12 Image processing device Expired - Fee Related JP4521835B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008029978A JP4521835B2 (en) 2008-02-12 2008-02-12 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008029978A JP4521835B2 (en) 2008-02-12 2008-02-12 Image processing device

Publications (2)

Publication Number Publication Date
JP2009194415A true JP2009194415A (en) 2009-08-27
JP4521835B2 JP4521835B2 (en) 2010-08-11

Family

ID=41076090

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008029978A Expired - Fee Related JP4521835B2 (en) 2008-02-12 2008-02-12 Image processing device

Country Status (1)

Country Link
JP (1) JP4521835B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015228581A (en) * 2014-05-30 2015-12-17 株式会社アクセル Method and system for reproducing moving image
JP2018194749A (en) * 2017-05-19 2018-12-06 ヤフー株式会社 Information display program, information display device, information display method, and distribution device
CN111447453A (en) * 2020-03-31 2020-07-24 西安万像电子科技有限公司 Image processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003116004A (en) * 2001-10-04 2003-04-18 Seiko Epson Corp Image file containing transparent part
WO2006041994A1 (en) * 2004-10-08 2006-04-20 Nvidia Corporation Methods and systems for rate control in image compression

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003116004A (en) * 2001-10-04 2003-04-18 Seiko Epson Corp Image file containing transparent part
WO2006041994A1 (en) * 2004-10-08 2006-04-20 Nvidia Corporation Methods and systems for rate control in image compression
JP2008516532A (en) * 2004-10-08 2008-05-15 エヌヴィディア コーポレイション Rate control method and system in image compression

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015228581A (en) * 2014-05-30 2015-12-17 株式会社アクセル Method and system for reproducing moving image
US10356431B2 (en) 2014-05-30 2019-07-16 Axell Corporation Moving image reproduction method and moving image reproduction system
JP2018194749A (en) * 2017-05-19 2018-12-06 ヤフー株式会社 Information display program, information display device, information display method, and distribution device
CN111447453A (en) * 2020-03-31 2020-07-24 西安万像电子科技有限公司 Image processing method and device

Also Published As

Publication number Publication date
JP4521835B2 (en) 2010-08-11

Similar Documents

Publication Publication Date Title
KR101266577B1 (en) The method and apparatus of processing an image
US8509310B2 (en) Method, medium, and system encoding and/or decoding an image
JP2018170771A (en) Method and apparatus for syntactic binary coding and context adaptive coding in video coding
TWI439138B (en) Enhanced compression in representing non-frame-edge blocks of image frames
JP6315911B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
JP2005333622A (en) Predictive reversible encoding of image and video
TWI466454B (en) Image coding apparatus, image coding method
JP2009010954A (en) Method and system for processing image at high speed
KR20110009058A (en) Method and apparatus for selective color channel coding/decoding in a layered video coding/decoding structure
US9324162B2 (en) Image processing apparatus, method, and program
JP2006081152A (en) Digital image encoding device, digital image encoding program, digital image encoding method, digital image decoding device, digital image decoding program, and digital image decoding method
JP2007037049A (en) Image coding apparatus and control method thereof, computer program and computer-readable storage medium
JP2003348358A (en) Image processing apparatus
JP4521835B2 (en) Image processing device
US8600181B2 (en) Method for compressing images and a format for compressed images
CN102550009A (en) Joint scalar embedded graphics coding for color images
JP4241517B2 (en) Image encoding apparatus and image decoding apparatus
US8494293B2 (en) Image processor
JP6635312B2 (en) Image processing apparatus and method
JP4971881B2 (en) Image encoding apparatus, image decoding apparatus, and control method thereof
JP6469277B2 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
US8160377B2 (en) Image compression apparatus
Woo et al. Improving JPEG-LS Performance Using Location Information
JP4262144B2 (en) Image coding apparatus and method
JP2004159260A (en) Image compression apparatus and image compression method and program of the same

Legal Events

Date Code Title Description
A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20090820

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090825

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20090825

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20090907

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090914

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091022

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091116

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100202

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20100202

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20100225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100428

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100429

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100520

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: 20100521

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130604

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20130604

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20130604

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313115

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees