JP4996501B2 - Multidimensional data encoding apparatus, decoding apparatus, and control method therefor - Google Patents
Multidimensional data encoding apparatus, decoding apparatus, and control method therefor Download PDFInfo
- Publication number
- JP4996501B2 JP4996501B2 JP2008037951A JP2008037951A JP4996501B2 JP 4996501 B2 JP4996501 B2 JP 4996501B2 JP 2008037951 A JP2008037951 A JP 2008037951A JP 2008037951 A JP2008037951 A JP 2008037951A JP 4996501 B2 JP4996501 B2 JP 4996501B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- difference
- dimensional
- encoding
- value
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 90
- 230000008569 process Effects 0.000 claims description 48
- 238000000605 extraction Methods 0.000 claims description 25
- 238000006243 chemical reaction Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 12
- 238000012545 processing Methods 0.000 description 37
- 230000006835 compression Effects 0.000 description 19
- 238000007906 compression Methods 0.000 description 19
- 238000004458 analytical method Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 14
- 238000013500 data storage Methods 0.000 description 12
- 238000004364 calculation method Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 239000000284 extract Substances 0.000 description 6
- 230000002441 reversible effect Effects 0.000 description 5
- 238000013075 data extraction Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000012447 hatching Effects 0.000 description 3
- 230000010365 information processing Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 239000003550 marker Substances 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000010561 standard procedure Methods 0.000 description 1
Images
Description
本発明は多次元データの符号化、復号技術に関するものである。 The present invention relates to a technique for encoding and decoding multidimensional data.
スキャナ、デジカメ、プリンタなどの画像入/出力装置は、それぞれ固有の色空間の画像の入力、或いは出力を行なう。これら固有の色空間を持つデバイス間で、カラー画像データを交換する場合、各デバイス独自の色とデバイスに依存しない色とを対応付けるカラープロファイルが用いられる。カラープロファイルの形式としては、International Colour Consortium(ICC)が策定したフォーマット(ICCプロファイル)が良く知られている。 Image input / output devices such as scanners, digital cameras, and printers each input or output an image in a specific color space. When color image data is exchanged between devices having these unique color spaces, a color profile that associates a color unique to each device with a color independent of the device is used. As a color profile format, a format (ICC profile) established by the International Color Consortium (ICC) is well known.
多くの場合、カラープロファイルには異なる2つの色空間を対応づけるカラーのルックアップテーブルが含まれている。このようなカラールックアップテーブルは複数成分を有する多次元配列データとみることができる。例えば、入力デバイスのRGBカラーとLabなどデバイスに依存しない標準色空間への対応を示したカラールックアップテーブルは、3次元3成分の多次元配列である。また、標準色空間と出力デバイスのCMYKデータとの対応づけるカラールックアップテーブルは、3次元4成分の多次元配列である。更に、CMYKと表示デバイスでのsRGBへの対応を示したカラールックアップテーブルは4次元3成分の多次元配列と見ることができる。 In many cases, a color profile includes a color lookup table that associates two different color spaces. Such a color lookup table can be regarded as multidimensional array data having a plurality of components. For example, a color look-up table showing the correspondence between RGB colors of input devices and standard color spaces that do not depend on devices such as Lab is a multi-dimensional array of three-dimensional three components. The color lookup table that associates the standard color space with the CMYK data of the output device is a three-dimensional, four-component multidimensional array. Furthermore, the color look-up table showing the correspondence between CMYK and sRGB in the display device can be viewed as a four-dimensional, three-component multidimensional array.
近年、カラー画像デバイスの高精度化により、このようなカラールックアップテーブルの各要素のデータ表現も8ビットから16ビットへと増加している。また、2つの色空間のマッピング方法も単一ではなく、用途に応じて使い分けられるように複数個定義されることがある。 In recent years, with the increase in accuracy of color image devices, the data representation of each element of such a color lookup table has also increased from 8 bits to 16 bits. Also, the mapping method of the two color spaces is not single, and a plurality of mapping methods may be defined so that they can be used properly according to the application.
複数の入力、出力デバイスに対応してカラーマッチングを行う画像処理装置用のソフトウェアを配布する場合には、そのアプリケーションと一緒に、対応するカラープロファイルデータを配布する必要がある。 When distributing software for an image processing apparatus that performs color matching corresponding to a plurality of input / output devices, it is necessary to distribute corresponding color profile data together with the application.
カラープロファイルの数が増えていくと、アプリケーションソフトウェアを記憶メディアに格納して配布する場合には多くの記憶容量を必要とするといった問題や、インターネット上でのダウンロードにより配布する場合には、伝送時間がかかってしまう。 As the number of color profiles increases, there is a problem that a large amount of storage capacity is required when distributing application software stored on storage media, and transmission time when distributing by downloading over the Internet. It will take.
かかる点に鑑み、例えば特許文献1は、プロファイルのカラールックアップテーブルを蛇行スキャンして1次元化し、前値との差分をランレングス、ハフマン符号化、LZ符号化などを用いて符号化する手法を開示している。
しかしながら、上記のような一元化する場合の圧縮率は高いものとは言えず、未だ、カラールックアップテーブルに適した圧縮手法は確立していないのが現状である。 However, it cannot be said that the compression rate in the case of unification as described above is high, and a compression method suitable for a color lookup table has not yet been established.
本願発明は、上述の問題点に鑑みてなされたものである。すなわち、本発明は、カラールックアップテーブルのような空間内の隣接する要素が互いに相関度の高い関係を有する多次元データを、簡単な構成で、高い圧縮率で可逆符号化すると共に、その符号化データを復号する技術を提供しようとするものである。 The present invention has been made in view of the above-mentioned problems. That is, the present invention reversibly encodes multidimensional data such as a color look-up table in which adjacent elements in a space have a high correlation with each other with a simple configuration and a high compression rate. The present invention intends to provide a technique for decoding encrypted data.
この課題を解決するため、例えば本発明の多次元データの符号化装置は以下の構成を備える。すなわち、
M(M≧3)次元で表される多次元空間における、Nビットで表わされ、非負の値を持つ要素データを可逆符号化する符号化装置であって、
前記多次元空間の1つの次元の軸の値αを順番に更新し、各αごとに2次元のデータ集合I(α)を入力する入力手段と、
入力した2次元のデータ集合I(α)を構成する各要素データと、1つ前に入力した2次元のデータ集合I(α-1)を構成する各要素データとの同じ2次元座標位置どうしの差分を示す、前記Nビットで表わされる要素差分データを算出し、当該要素差分データで構成される2次元の差分要素データ集合D(α)を生成する生成手段と、
該生成手段により生成された、2次元の差分要素データ集合D(α)を、当該2次元の差分要素データ集合D(α)内で予測符号化する符号化手段とを備え、
前記生成手段は、
前記データ集合I(α)と、前記1つ前に入力したデータ集合I(α-1)の同じ2次元座標位置の値をそれぞれV(α)、V(α−1)とし、整数xを整数yで除算したときの余りを返す関数をMod{x,y}とした場合、前記差分要素データ集合D(α)の前記2次元座標における該当する差分要素データの値Dvを、
Dv=Mod{V(α)−V(α−1)+2 N-1 、2 N }
として算出することで、前記差分要素データDvを、符号化対象の要素データと同じNビットにマッピングすることを特徴とする。
In order to solve this problem, for example, the multidimensional data encoding apparatus of the present invention comprises the following arrangement. That is,
An encoding device that losslessly encodes element data represented by N bits and having a non-negative value in a multidimensional space represented by M (M ≧ 3) dimensions,
Input means for sequentially updating the value α of one dimension axis of the multidimensional space and inputting a two-dimensional data set I (α) for each α;
The same two-dimensional coordinate positions of each element data constituting the input two-dimensional data set I (α) and each element data constituting the previous two-dimensional data set I (α-1) Generating means for calculating element difference data represented by the N bits and indicating a difference of the two-dimensional difference element data set D (α) composed of the element difference data;
Encoding means for predictively encoding the two-dimensional difference element data set D (α) generated by the generation means within the two-dimensional difference element data set D (α) ;
The generating means includes
The values of the same two-dimensional coordinate positions of the data set I (α) and the previous data set I (α-1) input are V (α) and V (α-1), respectively, and the integer x is When the function that returns the remainder when dividing by the integer y is Mod {x, y}, the value Dv of the corresponding difference element data in the two-dimensional coordinates of the difference element data set D (α) is
Dv = Mod {V (α) −V (α−1) +2 N−1 , 2 N }
As a result, the difference element data Dv is mapped to the same N bits as the element data to be encoded .
本発明によれば、カラールックアップテーブルのような空間内の隣接する要素が互いに相関度の高い関係を有する多次元データを、簡単な構成で、高い圧縮率で可逆符号化すると共に、その符号化データを復号することが可能になる。 According to the present invention, multidimensional data in which adjacent elements in a space such as a color look-up table have a high correlation with each other are losslessly encoded with a high compression rate with a simple configuration. It becomes possible to decode the digitized data.
以下、添付図面に従って本発明に係る実施形態を詳細に説明する。 Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.
<第1の実施形態>
先ず、多次元データの代表として色空間の変換用のカラールックアップテーブルを構成するデータを符号化する多次元データ符号化装置を説明する。
<First Embodiment>
First, a multidimensional data encoding apparatus that encodes data constituting a color lookup table for color space conversion as a representative of multidimensional data will be described.
図1は本第1の実施形態に係る多次元データ符号化装置のブロック構成図である。 FIG. 1 is a block diagram of the multidimensional data encoding apparatus according to the first embodiment.
図1に示すように、本実施形態に係る装置は、多次元データ入力部101、プレーンバッファ102、プレーン間差分生成部103、バッファ104、多値データ予測部105、予測誤差生成部106、予測誤差符号化部107、ハフマンテーブル用メモリ108、符号列形成部109、及び、装置全体の制御を司る制御部150を備える。同図において110、111、112は信号線を表す。なお、本実施形態では、多次元データ入力部101は、予め符号化対象となる多次元データを記憶してある記憶媒体をアクセスする装置とする。しかしながら、そのデータがネットワーク上のサーバに格納されている場合には、ネットワークインタフェースで構成しても良く、その種類は問わない。
As illustrated in FIG. 1, the apparatus according to the present embodiment includes a multidimensional
以下、図1を参照して、本第1の実施形態の多次元データ符号化装置の処理について説明する。 Hereinafter, processing of the multidimensional data encoding apparatus according to the first embodiment will be described with reference to FIG.
まず、前提として、本第1の実施形態に係る多次元データ符号化装置において処理対象となる多次元データは、X,Y、Zの3軸を有する3次元配列であるとする。また、3次元配列の各要素は16ビットで表現される非負の整数値データ(以降、多値データと称する)であるとする。そして、この多次元データの範囲は、各座標軸X,Y,Zについて“0”から“N−1”までの範囲とする。すなわち、多次元データは、N×N×N個の多値データで構成されるものとする。1つのデータは座標軸X,Y,Zの各値x,y,zで特定できるので、その多次元データI(x,y,z)と表す。なお、多次元データI(x,y,z)で示される多値データはN×N×N個の3次元配列に限らず、4次元の配列であっても良い。また、N×M×L個といった具合に各次元と取り得る範囲が異なっても構わない。 First, as a premise, the multidimensional data to be processed in the multidimensional data encoding device according to the first embodiment is assumed to be a three-dimensional array having three axes of X, Y, and Z. Each element of the three-dimensional array is assumed to be non-negative integer value data (hereinafter referred to as multi-value data) expressed by 16 bits. The range of the multidimensional data is a range from “0” to “N−1” for each coordinate axis X, Y, Z. That is, the multidimensional data is assumed to be composed of N × N × N multivalued data. Since one data can be specified by the respective values x, y, z of the coordinate axes X, Y, Z, it is expressed as multidimensional data I (x, y, z). The multi-value data indicated by the multi-dimensional data I (x, y, z) is not limited to N × N × N three-dimensional arrays, and may be a four-dimensional array. Further, the range that can be taken for each dimension may be different, such as N × M × L.
また、座標(x,y,z)で特定される3次元配列の要素が、例えばI0(x,y,z)、I1(x、y、z)、…、In(x,y,z)といった具合に、複数の成分値を有するものであっても構わない。これは、カラールックアップテーブルの場合に相当するが、説明を単純なものとするため、実施形態では、1つの座標につき、1つデータ(先に説明したように16ビットの多値データ)が格納される多次元データを符号化対象とする。なお、各要素のビット数も16にビットに限らず、8、10、12ビットなどであっても良い。上記はあくまで一例であると認識されたい。 The elements of the three-dimensional array specified by the coordinates (x, y, z) are, for example, I0 (x, y, z), I1 (x, y, z),..., In (x, y, z). For example, it may have a plurality of component values. Although this corresponds to the case of a color lookup table, in order to simplify the description, in the embodiment, one data (16-bit multi-value data as described above) is obtained for one coordinate. The stored multidimensional data is the encoding target. The number of bits of each element is not limited to 16, but may be 8, 10, 12 bits, or the like. It should be recognized that the above is merely an example.
図2は、本実施形態で入力される多次元データの概略図である。実施形態では、各次元の長さがNとしているので、図示の如く、3方が長さNの立方体形状を成している。 FIG. 2 is a schematic diagram of multidimensional data input in the present embodiment. In the embodiment, since the length of each dimension is N, three sides form a cube shape having a length N as illustrated.
まず、多次元データ入力部101は、符号化対象の多次元データを構成する個々の多値データを入力される。多値データの入力順はZ軸のパラメータzを0からN−1に向けて順番に変化させる。そして、パラメータzの値で定義される、パラメータx、yで表わされる平面を以下プレーンと呼ぶ。多値データは、このプレーンのラスタースキャン順に入力されるものとする。符号化対象が3次元空間であるのに対し、1つのプレーンはそれより1次元少ない2次元の要素の集合とも言える。
First, the multidimensional
図3(a)で斜線で示した部分は、z=0に固定して、x、yを変化させて構成されるプレーンである。最初に、このプレーンを構成する多値データがラスタースキャン順に入力される。そして、続いてz=1、z=2、…、z=N−1まで、順番に各プレーンの多値データがラスタースキャン順に走査されて入力される。
A portion indicated by hatching in FIG. 3A is a plane configured by changing x and y while fixing z = 0. First, multi-value data constituting this plane is input in the raster scan order. Subsequently, the multi-value data of each plane is scanned and input in order of raster scan until z = 1, z = 2,..., Z =
図3(b)は、0≦α<N(但し、値αは非負の整数)の任意の値αについて、z=αとしたプレーン(データ集合I(α))を図示したものである。以降の説明において、個々のプレーンを指す場合には、z=0であるプレーンをプレーンz0、z=1であるプレーンをプレーンz1というように、記号zとその値を「プレーン」に後続させて表現する。従って、図3(b)に示されるプレーンは「プレーンzα」と表現できる。 FIG. 3B illustrates a plane (data set I (α)) where z = α for an arbitrary value α of 0 ≦ α <N (where the value α is a non-negative integer). In the following description, when referring to individual planes, the symbol z and its value follow the “plane” so that the plane where z = 0 is the plane z0 and the plane where z = 1 is the plane z1. Express. Therefore, the plane shown in FIG. 3B can be expressed as “plane zα”.
プレーンバッファ102は1プレーン分の多値データ、即ち、N×N個の多値データを格納するための領域を持つFIFOのバッファで構成される。このプレーンバッファ102は内部に常にN×N個の要素を保持し、多値データ入力部101から入力される多値データI(x,y,z)を格納すると同時に、1プレーン前のデータI(x,y,z−1)を出力する。符号化開始時は、プレーンバッファ102に格納されるN×N個のデータは全て“0”に初期化される。この初期化されたデータは、多値画素データI(x,y,0)を入力した際のI(x,y,−1)に相当するデータと言えば分かりやすい。
The
プレーン間差分生成部103は、多次元データ入力部101から信号線110を介して入力される要素の多値データI(x,y,z)と、プレーンバッファ102から出力されてくる1つ前のプレーンの要素の多値データI(x,y,z−1)の差分を求める。これは、要素データ集合I(z)と要素集合I(z−1)との差分を算出することに相当する。プレーン間差分生成部103は、更に、差分のビット数の増加を抑えるために2^15(ここで「i^j」は値iのj乗を表わす)をその差分に加算した後に、その加算結果の2^16の剰余演算を行ってプレーン間差分値D(x,y,z−1)を生成する。これは差分要素データ集合Dを算出するとも言える。プレーン間差分値D(着目要素差分データ)は次式で表される。
D(x,y,z)=Mod(I(x,y,z)−I(x,y,z-1) + 2^15 , 2^16 )
上式において、Mod(i,j)は整数値iを整数jで割った剰余を表す。値jは正の整数である。 値iは非負の整数の場合には説明は不要であろう。そこで、値iが負の場合について簡単に説明する。
The inter-plane
D (x, y, z) = Mod (I (x, y, z) -I (x, y, z-1) + 2 ^ 15, 2 ^ 16)
In the above equation, Mod (i, j) represents a remainder obtained by dividing the integer value i by the integer j. The value j is a positive integer. The value i will not be explained if it is a non-negative integer. Therefore, the case where the value i is negative will be briefly described.
値iは、i=n×m +rの式を満たす0からm−1の範囲の整数値rを持つものと見なす。例えば、値i=−5,除数が“3”のMod(−5,3)の場合、
条件1:i=−5=n×3+r
条件2:0≦r≦2
を満たさなければならないわけであるから、n=−2、r=1となる。すなわち、Mod(−5,3)は、Mod(1,3)と見なして演算する。
The value i is considered to have an integer value r in the range of 0 to m−1 that satisfies the equation i = n × m + r. For example, in the case of Mod (−5, 3) where the value i = −5 and the divisor is “3”,
Condition 1: i = −5 = n × 3 + r
Condition 2: 0 ≦ r ≦ 2
Therefore, n = -2 and r = 1. That is, Mod (−5, 3) is calculated assuming that it is Mod (1, 3).
上記を更に分かりやすく説明すると次の通りである。説明を簡単なものとするため、2つの値Va,Vbが共に8ビットで表わされる非負の整数であるものとする。値Va,Vbは共に8ビットであるから、それぞれの取り得る範囲は0〜255の値であり、これ以外はあり得ないことに注意されたい。減算「Va−Vb」は、単純には−255〜+255の値を取り得る。しかし、Vaが“0”の場合、「Va−Vb」の値は、必ず−255〜0の範囲、すなわち、256種類中の1つの値となる。一方、Vbが“0”の場合には、「Va−Vb」の値は0〜+255、やはり、256種類中の1つの値となる。つまり、8ビットで表わされる2つの値の減算結果は、常に256種類の中の1つとなる、と言える。この減算結果に中間値128を加算して、256で剰余(あまり)を求めることで、減算結果を0〜255の値にマッピングできる。Va=0の例では、−255〜−129の値は129〜255に、−128〜0の値は0〜128に割り当てられる。また、Vb=0の例では、0〜127の値は128〜255に、128〜255の値は0〜127に割り当てられる。 The above will be explained in a more easy-to-understand manner as follows. In order to simplify the description, it is assumed that the two values Va and Vb are both non-negative integers represented by 8 bits. It should be noted that since the values Va and Vb are both 8 bits, each possible range is a value from 0 to 255, and there is no other possible value. The subtraction “Va−Vb” can simply take a value of −255 to +255. However, when Va is “0”, the value of “Va−Vb” is always in the range of −255 to 0, that is, one value in 256 types. On the other hand, when Vb is “0”, the value of “Va−Vb” is 0 to +255, which is also one of 256 types. That is, it can be said that the subtraction result of two values represented by 8 bits is always one of 256 types. By adding the intermediate value 128 to this subtraction result and obtaining a remainder (too much) at 256, the subtraction result can be mapped to a value of 0-255. In the example of Va = 0, a value of −255 to −129 is assigned to 129 to 255, and a value of −128 to 0 is assigned to 0 to 128. In the example of Vb = 0, the value of 0 to 127 is assigned to 128 to 255, and the value of 128 to 255 is assigned to 0 to 127.
さて、上記のようにして生成されるプレーン間差分値D(x,y,z)は入力多値データI(x,y,z)と同じビット数の情報となる。 The inter-plane difference value D (x, y, z) generated as described above is information having the same number of bits as the input multi-value data I (x, y, z).
バッファ104は信号線111から入力されるプレーン間差分値D(x,y,z)をN+1個分格納する容量を有する。
The
図4の斜線部はD(x,y,z)の入力時点でバッファ104に格納されるN+1個のプレーン間差分値Dデータを模式的に示したものである。以下、この座標(x,y,z)のプレーン間差分値D(x,y,z)を、着目データDi(要素差分データDiとも言う)と表現する。また、着目データDiの近傍に位置し、符号化処理済みの3つのデータをDa,Db,Dcとし、それら3つのデータを着目データDiの近傍データと呼ぶ。図5は、着目データDi(図示の*印)と、近傍データDa,Db,Dcとの相対位置関係を示している。近傍データDa,Db,Dcは次のように表わせる。
Da=D(x−1,y,z)(すなわち、着目データの左隣位置にあるデータ)
Db=D(x,y−1,z)(すなわち、着目データの真上位置にあるデータ)
Dc=D(x−1,y−1,z)(すなわち、着目データの左上位置にあるデータ)
The hatched portion in FIG. 4 schematically shows N + 1 inter-plane difference value D data stored in the
Da = D (x-1, y, z) (that is, data at the position adjacent to the left of the data of interest)
Db = D (x, y-1, z) (that is, data at a position directly above the data of interest)
Dc = D (x-1, y-1, z) (that is, data at the upper left position of the data of interest)
多値データ予測部105は、着目データDiの入力のタイミングに同期して、バッファ104をアクセスし、バッファ104内の着目データDiの近傍データDa,Db,Dcを入力する。そして、多値データ予測部105は、着目データDiの予測値pを以下の予測式に従って算出し、その算出した予測値pを予測誤差生成部106に出力する。
p=Da+Db−Dc
The multi-value
p = Da + Db-Dc
なお、予測値pの算出には例外がある。着目データDiの座標がプレーンの左上隅位置(X、Y座標が共に“0”)にあるとき、近傍データDa,Db,Dcはいずれもプレーン外となってしまう。この場合には、多値データ予測部105は、予測値pを“32768”(16ビットで表わされる最大値の半分の値)であるものとして出力する。また、着目データDiの座標がプレーンの左上隅位置以外の、最初のライン上にある場合(Y座標が“0”)には、多値データ予測部105は、データDaを予測値pとして出力する。そして、着目データDiの座標がプレーンの左上隅位置以外の、左端位置にある場合(X座標が“0”)、多値データ予測部105は、データDbを予測値pとして出力する。なお、この例外ルールは、復号装置と同じにすれば良いので、上記によって本発明が限定されるものではない。
There is an exception in the calculation of the predicted value p. When the coordinates of the data of interest Di are at the upper left corner position of the plane (both X and Y coordinates are “0”), the neighboring data Da, Db, and Dc are all out of the plane. In this case, the multi-value
予測誤差生成部106は信号線111を介して入力した着目データDi(=プレーン間差分値D(x,y,z))と、多値データ予測部105から入力した予測値pとの差分値を求め、その差分値を予測誤差eとして予測誤差符号化部107に出力する。
The prediction
予測誤差符号化部107は、まず、予測誤差生成部106から入力される予測誤差eが複数のグループのいずれに分類できるかを判定し、そのグループ番号SSSSと、グループごとに定められるビット長の付加ビットを生成する。
The prediction
図6に予測誤差eとグループ番号SSSSの関係を示す。付加ビットはグループ内で予測誤差を特定するための情報であり、そのビット長はグループ番号SSSSで与えられる。なお、SSSS=16である場合には例外的に付加ビットのビット長は0である。また、予測誤差eが正であるならば予測誤差eの下位SSSSビットが付加ビットとなり、負である場合にはe−1の下位SSSSビットが付加ビットとなる。付加ビットの最上位ビットは予測誤差eが正であれば1、負であれば0となる。予測誤差符号化部107の予測誤差eに対する符号の生成処理は、先ず、ハフマンテーブル用メモリ108に格納されているハフマンテーブル(図7)を参照して、グループ番号SSSSに対応する符号化データを出力する。次いで、SSSSが0または16でない場合には、続いてグループ番号により定まるビット長の付加ビットを出力する、という順序で行われる。
FIG. 6 shows the relationship between the prediction error e and the group number SSSS. The additional bits are information for specifying the prediction error within the group, and the bit length is given by the group number SSSS. Note that the bit length of the additional bits is exceptionally 0 when SSSS = 16. If the prediction error e is positive, the lower SSSS bits of the prediction error e are additional bits, and if it is negative, the lower SSSS bits of e-1 are additional bits. The most significant bit of the additional bits is 1 if the prediction error e is positive, and 0 if it is negative. The code generation process for the prediction error e of the prediction
符号列形成部109は、符号化処理の初期段階で、付加情報(ヘッダ)を生成し、信号線112上に出力する。この付加情報は、符号化対象となる多次元データのX,Y,Z軸方向の要素数(本実施形態の場合は全てN)、多次元データの各要素を構成する成分の数(本実施形態では1)、各成分の精度(実施形態では16ビット)や、予測誤差符号化部107で使用したハフマンテーブルの情報など復号時に必要とされる情報である。そして、符号列形成部109は、そのヘッダに後続して、予測誤差符号化部107から出力される各プレーンの符号化データを信号線112上に出力する。この結果、信号線112を介して出力された符号化データは、図8の構造を持つことになる。なお、信号線112の出力先はハードディスク等の記憶媒体或いは記憶装置とするが、ネットワークとしても良く、その出力先の種類は問わない。
The code
次に、上記多次元データ符号化装置で生成された符号化データを復号する復号装置について説明する。図9は復号装置のブロック構成図である。本装置は、図示の如く、符号バッファ901、ヘッダ解析部902、予測誤差復号部903、プレーン間差分復号部904、多次元データ復号部905、多次元データ出力部906、ハフマンテーブル用メモリ108、バッファ104、多値データ予測部105、プレーンバッファ102、及び、装置全体の制御を司る制御部950とを備える。同図において907、908は信号線を示す。図1に示した符号化側のブロックと同じ動作をするブロックについては同じ番号を付し、説明を省略する。
Next, a decoding apparatus that decodes encoded data generated by the multidimensional data encoding apparatus will be described. FIG. 9 is a block diagram of the decoding apparatus. As illustrated, the apparatus includes a
以下、本実施形態の復号装置の各処理部の処理内容について説明する。 Hereinafter, processing contents of each processing unit of the decoding device of the present embodiment will be described.
復号対象となる符号化データは信号線907から順に入力され、符号バッファ901に格納される。バッファ901には、全符号化データを格納しても良いし、後述する復号処理によって復号処理によって空エリアが発生する都度、符号化データを入力し、格納するようにしても構わない。
The encoded data to be decoded are sequentially input from the signal line 907 and stored in the
ヘッダ解析部902は符号バッファ901に格納される符号化データのヘッダ部分を解析し、付加情報を抽出する。付加情報は先に説明したように、ハフマンテーブルに関する情報、多次元データのX,Y,Z軸方向の要素数、各要素を構成する成分の数、各成分の精度(ビット数)などの情報である。ヘッダ解析部902は、抽出した付加情報を制御部950に通知する。制御部950は、ヘッダ解析部902からの付加情報を受けとると、先ず、プレーンバッファ102内のN×N個のデータ(16ビット)を“0”クリアする。そして、制御部950は、付加情報に基づき、各処理部に復号処理に必要な設定を行ない、復号処理を開始させる。なお、ヘッダ解析部902は、ヘッダより取り出したハフマンテーブルのデータをハフマンテーブル用メモリ108に格納する。ここでは符号化装置と同様に、図7のハフマンテーブルがハフマンテーブル用メモリ108に格納されるものとして説明する。
The
予測誤差復号部(第1の復号部として機能する)903は符号バッファ901から必要な長さのビットデータを取り出し、ハフマンテーブル用メモリ108に格納されるハフマンテーブルを参照して、着目するプレーン間差分値の予測誤差eを復号して出力する。予測誤差eの復号は上述の予測符号化部107の処理を逆の手順で行うことにより実施される。即ち、まず、ハフマンテーブル用メモリ108を参照して予測誤差eのグループ番号SSSSを復号する。グループ番号SSSSが0または16でない場合には続いてグループ番号により定まるビット長で付加ビットを取得する。グループ番号SSSSと付加ビットから予測誤差eを復号し、プレーン間差分復号部904へと出力する。
A prediction error decoding unit (functioning as a first decoding unit) 903 takes out bit data having a necessary length from the
多値データ予測部105では先に述べた符号化時と同じ動作により、バッファ104に格納されている既に復号済みのプレーン間差分値Da,Db,Dcから、着目プレーン間差分値Diの予測値pを生成する。
The multi-value
プレーン間差分復号部904では多値データ予測部105から出力される予測値pと予測誤差復号部903から出力される予測誤差eとを加算して着目プレーン間差分値Diを復元し、信号線908へと出力する。
The inter-plane
多次元データ復号部(第2の復号部として機能する)905は、プレーン間差分復号部904から出力される着目プレーン間差分値Di(=D(x,y,z))と、直前のプレーンの多値データI(x,y,z−1)を取り出す。そして、多次元データ復号部905は、プレーン間差分生成部103の処理と逆の手順により、着目位置の多値データ I(x,y,z)を復号する。復号した多値データI(x、y、z)は、多次元データ出力部906へと渡されると共に、プレーンバッファ102へと格納される。
A multi-dimensional data decoding unit (functioning as a second decoding unit) 905 includes the inter-plane difference value Di (= D (x, y, z)) output from the inter-plane
多次元データ出力部906は、復号した多次元データを装置外部に出力するものであり、本実施形態においては記憶媒体であるとするが、ネットワークへのインターフェース等、その種類は問わない。
The multi-dimensional
以上であるが、ここで3次元配列の要素 I (x,y,z)を符号化する場合について考察する。この場合の、多値データ予測部105で生成される予測値をP(x,y,z)、予測誤差符号化部107で符号化される予測誤差eをE(x、y、z)と表すと、予測誤差E(x,y,z)は次式によって表わされる。
E(x,y,z) =D(x,y,z)−P(x,y,z)
=D(x,y,z)−{D(x-1,y,z)+D(x,y-1,z)−D(x-1,y-1,z)}
ここで、D(x,y,z)は、多値データI(x、y、z)とI(x,y,z−1)の差分であるから、上式は更に次のように展開できる。
E(x,y,z) ={I(x,y,z)−I(x,y,z-1)}
−{I(x-1,y,z)-I(x-1,y,z-1)+I(x,y-1,z)-I(x,y-1,z-1)
+I(x-1,y-1,z)-I(x-1,y-1,z-1)}
=I(x,y,z)−{I(x-1,y,z)+I(x,y-1,z)+I(x-1,y-1,z)}−
{I(x,y,z-1)−{I(x-1,y,z-1)+I(x,y-1,z-1)+I(x-1,y-1,z-1)}}
これは要素I(x,y,z)を、予測値P’(x、y、z)=I(x−1,y,z)+I(x,y−1,z)- I(x−1、y−1、z)で符号化する場合に、直前のプレーンで発生した予測誤差E’(x、y、z−1)=I(x,y,z−1)−{I(x−1,y,z−1)+I(x,y−1,z−1)− I(x−1、y−1、z−1) }をフィードバックしていることを示している。従って、プレーン間で予測誤差がE’が近い値をもつような多次元ルックアップテーブルの場合、圧縮率は非常に高いものとすることができるのが理解できよう。
As described above, consider the case where the element I (x, y, z) of the three-dimensional array is encoded. In this case, the prediction value generated by the multilevel
E (x, y, z) = D (x, y, z) -P (x, y, z)
= D (x, y, z)-{D (x-1, y, z) + D (x, y-1, z) -D (x-1, y-1, z)}
Here, D (x, y, z) is the difference between the multi-value data I (x, y, z) and I (x, y, z-1), so the above expression is further expanded as follows: it can.
E (x, y, z) = {I (x, y, z) -I (x, y, z-1)}
-{I (x-1, y, z) -I (x-1, y, z-1) + I (x, y-1, z) -I (x, y-1, z-1)
+ I (x-1, y-1, z) -I (x-1, y-1, z-1)}
= I (x, y, z)-{I (x-1, y, z) + I (x, y-1, z) + I (x-1, y-1, z)}-
{I (x, y, z-1)-{I (x-1, y, z-1) + I (x, y-1, z-1) + I (x-1, y-1, z-1) )}}
This means that the element I (x, y, z) is converted into the predicted value P ′ (x, y, z) = I (x−1, y, z) + I (x, y−1, z) −I (x− 1, y−1, z), encoding error E ′ (x, y, z−1) = I (x, y, z−1) − {I (x −1, y, z−1) + I (x, y−1, z−1) −I (x−1, y−1, z−1)} is fed back. Therefore, it can be understood that the compression ratio can be very high in the case of a multidimensional lookup table in which the prediction error has a value close to E ′ between planes.
以上説明したように本実施形態によれば、カラールックアップテーブルのように多次元(3次元以上)データの多次元空間内の隣接するデータの差が十分に小さいことを利用して可逆符号化している。従って、オリジナルの多次元データに対して高い圧縮率で可逆の符号化データを生成することが可能になる。 As described above, according to the present embodiment, lossless encoding is performed using the fact that the difference between adjacent data in a multidimensional space of multidimensional data (three or more dimensions) is sufficiently small as in a color lookup table. ing. Therefore, it is possible to generate lossless encoded data with high compression rate for the original multidimensional data.
なお、実施形態では、3次元空間中の1つの要素は1成分で構成されるものとしたが、1要素は複数成分を備える場合にも適用できる。例えば、デバイス依存のRGB空間を標準色空間Labに変換するルックアップテーブルの場合、R、G、Bの各成分値が座標値とし、その座標値で特定される要素は(L,a,b)の3つの成分値を持つことになる。この場合、それぞれの成分毎に上記処理を行なえば良いのは明らかである。 In the embodiment, one element in the three-dimensional space is configured by one component, but the present invention can also be applied to a case where one element includes a plurality of components. For example, in the case of a lookup table that converts a device-dependent RGB space into a standard color space Lab, each component value of R, G, and B is a coordinate value, and elements specified by the coordinate value are (L, a, b ) Have three component values. In this case, it is obvious that the above-described processing should be performed for each component.
また、実施形態では、次元数を“3”の例を説明したが、次元数は“3”に限定されるものではない。ここでは、M次元(Mは3以上の値である)のデータについて考察する。1つの要素はM個の座標軸Q0、Q1、Q2、Q3、…、QM-1の各座標値で特定される。各座標軸における座標値をq0,q1,q2、…、qM-1とすると、1つの要素のデータはI(q0,q1,q2,…qM-1)と定義できる。このM次元の空間を、そのM次元に特化したスキャン方向にスキャンして符号する場合について考察する。 In the embodiment, the example in which the number of dimensions is “3” has been described, but the number of dimensions is not limited to “3”. Here, consider data of M dimensions (M is a value of 3 or more). One element is specified by the coordinate values of M coordinate axes Q 0 , Q 1 , Q 2 , Q 3 ,..., Q M−1 . If the coordinate values on each coordinate axis are q 0 , q 1 , q 2 ,..., Q M−1 , the data of one element can be defined as I (q 0 , q 1 , q 2 ,... Q M−1 ). . Consider a case where this M-dimensional space is scanned and coded in a scan direction specialized for the M dimension.
この場合、或る座標軸、例えば最後の座標軸QM-1の値qM-1=αである仮想2次元プレーン「α」(実際はM−1次元の空間であるが敢えてこのように表現する)と定義した場合、この多次元データは仮想2次元プレーンの集合と見ることができる。そこで、仮想2次元プレーン「α」と、仮想2次元プレーン「α−1」と差分を、先に示した仮想プレーン間差分値D(q0,q1,…,qM-2,α)として求める。
D(q0,q1,…,qM-2,α)=I(q0,q1,…qM-2,…,α)−I(q0,q1,…,qM-2,α−1)
In this case, a virtual two-dimensional plane “α” having a certain coordinate axis, for example, the value q M−1 = α of the last coordinate axis Q M−1 (actually an M−1 dimensional space, but expressed in this way) This multidimensional data can be viewed as a set of virtual two-dimensional planes. Therefore, the difference between the virtual two-dimensional plane “α” and the virtual two-dimensional plane “α-1” is calculated as the difference value D (q 0 , q 1 ,..., Q M−2 , α). Asking.
D (q 0 , q 1 , ..., q M-2 , α) = I (q 0 , q 1 , ... q M-2 , ..., α) -I (q 0 , q 1 , ..., q M- 2 , α-1)
これ以降は、上記と同様に、着目データDi(=D(q0,q1,…,qM-2,α))の近傍の、符号化済みの座標位置にある1つ又は複数のプレーン間差分値Dから予測値pを求め、着目データDiと予測値pとの差分を予測誤差として符号化することで、M次元の着目データ集合Dの符号化データを生成することができる。 Thereafter, similarly to the above, one or more planes at the encoded coordinate positions in the vicinity of the data of interest Di (= D (q 0 , q 1 ,..., Q M−2 , α)). By obtaining the predicted value p from the inter-difference value D and encoding the difference between the target data Di and the predicted value p as a prediction error, encoded data of the M-dimensional target data set D can be generated.
なお、上記実施形態では、符号化側と復号側の装置がそれぞれ別々の装置であるものとしたが、1つの装置内にこの2つの機能を持つものでも構わない。 In the above embodiment, the encoding side and decoding side apparatuses are separate apparatuses, but one apparatus may have these two functions.
<第1の実施形態の変形例>
上記第1の実施形態を、例えばパーソナルコンピュータ等の汎用の情報処理装置のソフトウェア(コンピュータプログラム)でもって、上記と等価の処理を行なうことも可能である。
<Modification of First Embodiment>
The first embodiment can be processed equivalent to the above by using software (computer program) of a general-purpose information processing apparatus such as a personal computer.
図10は本変形例に係る情報処理装置の基本構成を示す図である。 FIG. 10 is a diagram showing a basic configuration of an information processing apparatus according to this modification.
図中、1401は装置全体の制御を司るCPUである。1402はCPU1401のワークエリアとして使用するRAMであり、1403はBIOS及びブートプログラムを格納しているROMである。1404はキーボード、1405はポインティングデバイスの1つであるマウスである。1406は表示制御部であって、内部にはビデオメモリ及びCPU1401の制御によってビデオメモリへの描画、及び、ビデオメモリに可能されたデータをビデオ信号として表示装置1412に出力する表示コントローラを内蔵している。表示装置1412はCRTや液晶表示装置である。1407はハードディスク装置等の外部記憶装置であり、これにはOS(オペレーティングシステム)、多次元データ処理を行なうアプリケーションプログラムが格納されている。なお、外部記憶装置1407は、各種アプリケーションで作成されたファイルを格納するためにも利用される。1408は記憶媒体ドライブであり、フレキシブルディスク、メモリカード、CD−ROM等の記憶媒体に対してリード/ライトを行なう。1409は本装置とイメージスキャナ1411とを接続するためのスキャナインタフェース(USBやSCSIインタフェース等)ある。1413はネットワークインタフェースである。
In the figure,
本装置の電源がONになると、CPU1401はROM1403のブートプログラムに従って、外部記憶装置1407からOSをRAM1402にロードする。この結果、OSの制御の下で、表示制御部1406にGUIを描画して、表示装置1412にそのGUIを表示させる。操作者は、表示装置1412の表示を見て、キーボード1404やマウス1405を操作することになる。ここで、多次元データ処理アプリケーションの起動指示が操作者より与えられると、CPU1401は外部記憶装置1407内の多次元データ処理アプリケーションプログラムをRAM1402にロードし、実行する。この結果、本装置が多次元データ処理装置として機能することになる。
When the power of the apparatus is turned on, the
CPU1401が多次元データ処理アプリケーションを実行し、操作者より符号化対象となる画像の入力指示を受けると、外部記憶装置1407から多次元データ、またはその符号化データを入力し、符号化、復号を行なうことになる。符号化結果、復号結果は、外部記憶装置1407にファイルとして格納する。
When the
ここで、多次元データ処理アプリケーションは、図1に示す各構成要素に相当するモジュール(サブルーチン、関数と言い換えることもできる)、或いは図9に示す各構成要素に相当するモジュールを有する。ただし、プレーンバッファ102、バッファ104、符号バッファ109については、RAM1402に確保されることになる。
Here, the multidimensional data processing application has modules corresponding to the respective components shown in FIG. 1 (which can also be referred to as subroutines and functions), or modules corresponding to the respective components shown in FIG. However, the
図11は、本実施形態に係る多次元データ処理装置による符号化処理の流れを示すフローチャートである。以下、同図のフローチャートに従い、CPU1401が実行する手順(多次元データ処理アプリケーションの符号化処理)を説明する。なお、説明を簡単なものとするため、符号化対象のデータは第1の実施形態と同様3次元ルックアップテーブルであり、1つの要素は1つの成分で構成されており、ルックアップテーブルの取り得る範囲は各座標軸とも0乃至N−1であるものとして説明する。 FIG. 11 is a flowchart showing a flow of encoding processing by the multidimensional data processing apparatus according to the present embodiment. The procedure executed by the CPU 1401 (encoding process of a multidimensional data processing application) will be described below with reference to the flowchart of FIG. In order to simplify the description, the data to be encoded is a three-dimensional lookup table as in the first embodiment, and one element is composed of one component. The range to be obtained will be described on the assumption that each coordinate axis is 0 to N-1.
まず、符号化処理の開始に先立ち、装置の初期化処理が行われる(ステップS1100)。プレーンバッファ102の初期値設定はこのタイミングで行われ、N×N個のデータの初期値として0が設定される。続いて、符号化対象の多次元データに関する情報や、ハフマンテーブルの情報からファイルヘッダを生成し、外部記憶装置1407に書き込む(ステップS1101)。次いで、ステップS1102、S1103、S1104において、変数z、y、xをそれぞれ“0”に初期化する。
First, prior to the start of the encoding process, the apparatus is initialized (step S1100). The initial value of the
ステップS1105では、多値データ I(x,y,z)を着目データとして入力する。ステップS1106において、着目多値データI(x,y,z)と直前のプレーンのX、Y座標値が着目多値データと同じ多値データI(x,y,z−1)との差分をプレーン間差分D(x,y,z)として算出する。続いて、ステップS1107にて予測値pを算出し、予測誤差eを算出する。ステップS1108では予測誤差eの符号化処理が行われ、その符号化データをファイルヘッダに後続するデータとして外部記憶装置1407に書き込む。
In step S1105, multi-value data I (x, y, z) is input as the data of interest. In step S1106, the difference between the target multi-value data I (x, y, z) and the multi-value data I (x, y, z−1) in which the X and Y coordinate values of the immediately preceding plane are the same as the target multi-value data is calculated. Calculated as the interplane difference D (x, y, z). Subsequently, in step S1107, a predicted value p is calculated, and a prediction error e is calculated. In step S1108, the prediction error e is encoded, and the encoded data is written in the
この後、ステップS1109に進み、変数xに“1”を加えることで変数xを更新する。そして、ステップS1110にて、変数xの値とNとを比較する。x<Nであると判断した場合にはステップS1105へ、x≧N(実際はx=N)の場合にはステップS1111へと処理を移す。 Thereafter, the process proceeds to step S1109, and the variable x is updated by adding “1” to the variable x. In step S1110, the value of the variable x is compared with N. If it is determined that x <N, the process proceeds to step S1105. If x ≧ N (actually x = N), the process proceeds to step S1111.
ステップS1111では、変数yに“1”を加え、ステップS1112で変数yの値とNとを比較する。y<Nである場合にはステップS1104へと処理を移し、y≧N(y=N)の場合にはステップS1113へと処理を移す。ステップS1113では、変数zに“1”を加えて更新し、ステップS114において変数zの値とNとを比較する。z<Nである場合にはステップS1103に処理を移し、z≧N(z=N)の場合には、本符号化処理を終了する。 In step S1111, “1” is added to the variable y, and the value of the variable y is compared with N in step S1112. If y <N, the process proceeds to step S1104. If y ≧ N (y = N), the process proceeds to step S1113. In step S1113, the variable z is updated by adding “1”, and the value of the variable z is compared with N in step S114. If z <N, the process proceeds to step S1103. If z ≧ N (z = N), the encoding process ends.
以上説明したように、先に説明した第1の実施形態と同様の処理を、コンピュータプログラムにとっても実現できるようになる。 As described above, the same processing as that of the first embodiment described above can be realized for a computer program.
次に、CPU1401が実行する多次元データ処理アプリケーションの復号処理を図12のフローチャートに従って説明する。
Next, the decoding process of the multidimensional data processing application executed by the
まず、復号処理の開始に先立ち、装置の初期化処理が行われる(ステップS1200)。プレーンバッファ102の初期値設定はこのタイミングで行われ、N×N個のデータを初期値“0”に設定する。続いて、復号対象のファイルヘッダを読込み、復号対象の多次元データに関する情報や、ハフマンテーブルの情報をそのヘッダから取得する(ステップS1201)。ステップS1202、S1203、S1204にて、変数z,y,xをそれぞれを“0”に設定する。
First, prior to starting the decoding process, the apparatus is initialized (step S1200). The initial value of the
ステップS1205では、ハフマンテーブルを参照して予測誤差eを復号する。そして、ステップS1206にて、既に復号済みのデータから予測値pを求め、予測誤差eに予測値pを加算することで、プレーン間差分値D(x,y,z)を復元する。ステップS1207では、直前のプレーンの復号結果を格納するバッファ中の該当する多値データI(x,y,z-1)を読込み、着目プレーン中の着目データを復号し、復号結果を格納する外部記憶装置に出力する。 In step S1205, the prediction error e is decoded with reference to the Huffman table. In step S1206, the prediction value p is obtained from the already decoded data, and the prediction value p is added to the prediction error e to restore the inter-plane difference value D (x, y, z). In step S1207, the corresponding multi-value data I (x, y, z-1) in the buffer storing the decoding result of the immediately preceding plane is read, the attention data in the attention plane is decoded, and the decoding result is stored. Output to storage device.
この後、ステップS1208に進み、変数xに“1”を加えることで変数xを更新する。そして、ステップS1209にて、変数xの値とNとを比較する。x<Nであると判断した場合にはステップS1205へ、x≧N(実際はx=N)の場合にはステップS1210へと処理を移す。 Thereafter, the process proceeds to step S1208, and the variable x is updated by adding “1” to the variable x. In step S1209, the value of the variable x is compared with N. If it is determined that x <N, the process proceeds to step S1205. If x ≧ N (actually x = N), the process proceeds to step S1210.
ステップS1210では、変数yに“1”を加え、ステップS1211で変数yの値とNとを比較する。y<Nである場合にはステップS1204へと処理を移し、y≧N(y=N)の場合にはステップS1212へと処理を移す。ステップS1212では、変数zに“1”を加えて更新し、ステップS1213において変数zの値とNとを比較する。z<Nである場合にはステップS1203に処理を移し、z≧N(z=N)の場合には、本復号処理を終了する。 In step S1210, “1” is added to the variable y, and the value of the variable y is compared with N in step S1211. If y <N, the process proceeds to step S1204. If y ≧ N (y = N), the process proceeds to step S1212. In step S1212, the variable z is updated by adding “1”. In step S1213, the value of the variable z is compared with N. If z <N, the process proceeds to step S1203. If z ≧ N (z = N), the decoding process ends.
以上説明したように第1の実施形態と同様の機能をコンピュータプログラムによっても実現でき、同様の作用効果を奏することが可能になる。 As described above, the same function as in the first embodiment can be realized by a computer program, and the same function and effect can be achieved.
なお、上記では、符号化対象の多次元データは外部記憶装置1407から読み出すものとしたが、符号化対象の多次元データは記憶媒体に格納されていても良いし、ネットワーク上のサーバからダウンロードする場合にも適用可能である。また符号化結果の出力先も、外部記憶装置1407に限らず、ネットワークでも構わないし、その出力先は如何なるものでも構わない。
In the above description, the multidimensional data to be encoded is read from the
<第2の実施形態>
第2の実施形態では、ICCプロファイルデータの中のカラールックアップテーブルを圧縮してICCプロファイル圧縮データを符号化する例とそれを復号する例を説明する。
<Second Embodiment>
In the second embodiment, an example in which a color lookup table in ICC profile data is compressed to encode ICC profile compressed data and an example in which the data is decoded will be described.
図13は本第2の実施形態に係る多次元データの符号化装置のブロック構成図である。本第2の実施形態に係る符号化装置は、ICCプロファイル入力部1301、ICCプロファイル格納用メモリ1302、タグテーブル解析部1303、CLUT抽出部1304、プレーンバッファ1305、プレーン間差分変換部1306、JPEG可逆符号化部1307、CLUT符号化データ格納用メモリ1308、ICCプロファイルデータ形成部1309、ICCプロファイル圧縮データ出力部1310、そして、装置全体の制御を司る制御部1350を備える。同図において1311、1312は信号線を示す。
FIG. 13 is a block diagram of a multidimensional data encoding apparatus according to the second embodiment. The encoding apparatus according to the second embodiment includes an ICC
以下、同図を参照して、本第2の実施形態の符号化装置の多次元データであるICCプロファイルデータの符号化処理について説明する。 Hereinafter, an encoding process of ICC profile data which is multidimensional data of the encoding apparatus of the second embodiment will be described with reference to FIG.
ICCプロファイルは、入力デバイス、出力デバイス、表示デバイスをPCS(Profile Connection Space)と呼ばれるデバイス非依存の標準色空間を介して結びつけ、カラー画像データの互換性を保つ技術である。この技術は、現在、カラーマネージメントを行う上での標準的な手法として広く利用されている。ICCプロファイルの詳細については公知であるので、ここでは説明を省略する。 The ICC profile is a technique for maintaining compatibility of color image data by connecting an input device, an output device, and a display device through a device-independent standard color space called PCS (Profile Connection Space). This technology is currently widely used as a standard method for color management. Since the details of the ICC profile are publicly known, the description thereof is omitted here.
本第2の実施形態に係る符号化装置は、International Colour Consortium (ICC)の策定したフォーマットによるカラープロファイルデータ(ICCプロファイルデータ)を符号化対象とする。図14にICCプロファイルデータの構造を図示する。ICCプロファイルデータは128バイトのプロファイルヘッダ(Profile header)1401を備える。そして、ヘッダに後続して、タグ付き要素データ(Tagged Element Data)の数を示したタグカウント(Tag Count)1402、各タグ付き要素データのタイプを示したシグネチャ、データ格納位置へのオフセット値、及び、データサイズを記述したタグテーブル(Tag Table)1404、そして、タグ付き要素データ1405から構成される。
The encoding apparatus according to the second embodiment uses color profile data (ICC profile data) in a format established by the International Color Consortium (ICC) as an encoding target. FIG. 14 shows the structure of ICC profile data. The ICC profile data includes a 128-
特に、本第2の実施形態での符号化対象とするICCプロファイルデータには、タグ付き要素データに一つのlut16Typeのタグ付き要素データ(図14の1403)が存在するものとする。また、そのタグ付き要素データの他に、カラールックアップテーブル(CLUT)を含むタグ付き要素データを含まないものとする。しかしながら、本発明は同様にlut8Typeのタグ付き要素データや、lutAtoBType、lutBtoATypeのタグ付き要素データに対しても適用可能である。また、このようなタグ付き要素データを複数含むICCプロファイルデータに対しても適用可能である。複数存在する場合には、以下に説明するlut16Typeのタグ付き要素データに対する処理と同様の処理をそれぞれのタグ付き要素データに対して適用すれば良い。 In particular, in the ICC profile data to be encoded in the second embodiment, it is assumed that there is one lut16Type tagged element data (1403 in FIG. 14) in the tagged element data. Further, in addition to the tagged element data, the tagged element data including the color lookup table (CLUT) is not included. However, the present invention is also applicable to lut8Type tagged element data and lutAtoBType and lutBtoAType tagged element data. The present invention can also be applied to ICC profile data including a plurality of such tagged element data. When there are a plurality of elements, the same process as that described below for the lut16Type tagged element data may be applied to each tagged element data.
次に、本第2の実施形態の画像処理装置での各部の動作について説明する。 Next, the operation of each unit in the image processing apparatus according to the second embodiment will be described.
まず、符号化対象となるICCプロファイルがICCプロファイル入力部1301から入力される。ICCプロファイル入力部1301は外部記憶媒体へのインターフェース、またはネットワークへのインターフェース等であり、符号化対象となるICCプロファイルデータを装置内部に取り込む役割を果たす。ICCプロファイル入力部1301は、入力したICCプロファイルデータを、一旦、ICCプロファイル格納用メモリ1302へ格納する。
First, an ICC profile to be encoded is input from an ICC
ICCプロファイルデータがICCプロファイル格納用メモリ1302に格納されると、タグテーブル解析部1303ではICCプロファイルのタグテーブルを解析し、lut16Typeのタグ付き要素データを抜き出してCLUT抽出部1304に送る。
When the ICC profile data is stored in the ICC
CLUT抽出部1304はその内部に不図示のバッファを有し、タグテーブル解析部1303により抜き出されたlut16Typeのタグ付き要素データを格納する。lut16Typeのタグ付き要素データはi次元の色空間をo次元の別の色空間に対応付けるものであり、3×3配列、1次元入力テーブル、多次元カラールックアップテーブル(CLUT)、1次元出力テーブルで構成される。CLUTはi次元の配列であり、各配列要素がo個の成分値を有する。lut16Typeのタグ付き要素データには付加情報として、i、oの他、CLUTの各次元の要素数gが記される。CLUT抽出部1304はlut16Typeのフォーマットに従って、i,o,gを取得し、CLUTの各要素の各成分を順番にプレーン間差分変換部1306へ出力する。
The
CLUTには3次元3成分、3次元4成分、4次元3成分などがあるが、本第2の実施形態では3次元3成分であり、各次元の要素数g=Nの場合を例に説明する。従って、本実施形態でのCLUTの要素数はN×N×Nであり、成分の総数はN×N×N×3である。よってCLUTの構成は第1の実施形態で符号化対象とした図2の多次元データと同じであり、各要素が3成分で構成されている点が異なる。 The CLUT includes three-dimensional three-components, three-dimensional four-components, four-dimensional three-components, etc., but in the second embodiment, there are three-dimensional three-components, and an example in which the number of elements in each dimension g = N will be described. To do. Therefore, the number of elements of the CLUT in this embodiment is N × N × N, and the total number of components is N × N × N × 3. Therefore, the configuration of the CLUT is the same as the multidimensional data of FIG. 2 that is the encoding target in the first embodiment, and is different in that each element is composed of three components.
X,Y,Z軸の位置がそれぞれx、y、zである3次元配列の要素の第1成分をI0(x,y,z)、第2成分をI1(x,y,z)、第3成分をI2(x,y,z)と記す。lut16Typeの場合、各成分値は16ビットで表現される。 The first component of the elements of the three-dimensional array whose X, Y, and Z axis positions are x, y, and z are I0 (x, y, z), the second component is I1 (x, y, z), the second The three components are denoted as I2 (x, y, z). In the case of lut16Type, each component value is expressed by 16 bits.
プレーンバッファ1305はCLUT抽出部1304から出力される3次元配列の要素を1プレーン分格納する。プレーンの概念は第1実施形態と同じであるが、各要素が3成分で構成されるため、プレーンバッファ1305にはN×N×N×2×3バイト分の容量が必要となる。プレーンバッファ1305は符号化処理の開始時点で全ての値を0に初期化する。
The
プレーン間差分変換部1306はCLUT抽出部1304から出力されるIn(x、y、z)(nは0、1,2のいずれか)について、プレーンバッファ1305から当該成分値の直前のプレーンの値In(x、y、z−1)を読み出す。そして、プレーン間差分変換部1306は、プレーン間差分値Dn(x、y、z)を生成し、出力する。具体的には以下の式を用いる。
Dn(x、y、z)=Mod(In(x、y、z)−In(x、y、z−1)+(2^15),(2^16))
The inter-plane
Dn (x, y, z) = Mod (In (x, y, z) -In (x, y, z-1) + (2 ^ 15), (2 ^ 16))
JPEG可逆符号化部1307はプレーン間差分変換部1306から順次入力されるN×N×N個、3成分、各16ビットのプレーン間差分値Dn(x、y、z)を水平方向画素数N、垂直方向画素数N×Nの3成分、16ビットの画像データとしてJPEG(ISO/IEC 10918−1)に規定される可逆符号化(Lossless Process)により符号化し、符号化データをCLUT符号化データ格納用メモリ1308に格納する。JPEGの可逆符号化処理については規格書「ITU−T T.81|ISO/IEC10918−1 Information technology - Digital compression and coding of continuous-tone still images : Requirements and guidelines」や各種解説書に詳細が書かれているのでここでは説明を省略する。
The JPEG
JPEGの可逆符号化では予測なしを含めて8通りの予測式を選択することができる。ここでは、ここでは予測式の選択番号m=4、すなわち、Px=Ra+Rb−Rcを使用する(詳しくは、上記規格書のAnnex H Table H.1 - Predictors for lossless codingを参照されたい)。なお、本第2の実施形態では水平方向画素数をN、垂直方向画素数をN×Nとしているが、水平方向画素数をN×N、垂直方向画素数をNとして符号化しても構わない。 In JPEG lossless encoding, eight prediction formulas including no prediction can be selected. Here, the selection number m = 4 of the prediction formula, that is, Px = Ra + Rb−Rc is used here (for details, see Annex H Table H.1-Predictors for lossless coding in the above-mentioned standard). In the second embodiment, the number of horizontal pixels is N and the number of vertical pixels is N × N. However, the number of horizontal pixels may be N × N and the number of vertical pixels may be N. .
CLUT符号化データ格納用メモリ1308にCLUT符号化データが格納されたとする。この場合、ICCプロファイル圧縮データ形成部1309は、ICCプロファイル格納用メモリ1302に格納されるICCプロファイルデータと、CLUT符号化データ格納用メモリ1308に格納されるCLUT符号化データから必要なデータを取り出す。そし、ICCプロファイル圧縮データを形成して出力する。ICCプロファイル圧縮データはICCプロファイル格納用メモリに格納されるICCプロファイルデータのうち、CLUT抽出部1304で抽出されたCLUTをCLUT符号化データ格納用メモリに格納されているCLUT符号化データで置き換えたものである。図15はICCプロファイル圧縮データ形成部1309で生成されるICCプロファイル圧縮データの構造を示したものである。圧縮前の図14との違いは、CLUTの圧縮によりCLUTを含むタグ付き要素データ1403(図14)のCLUT部分がCLUT符号化データ格納用メモリ1308に格納されるCLUT符号化データによって置き換えられ、図15のようにCLUT圧縮データを含むタグ付き要素データ1501になる。また、CLUTの符号化によるタグ付き要素データのサイズ変更に伴い、タグテーブル中、CLUT圧縮データを含むタグ付き要素データのサイズを記した部分(図15の参照番号1502)が書き換えられる。更に、CLUT圧縮データを含むタグ付き要素データの後に続くタグ付き要素データ1504のオフセット位置が変わるため、それらのオフセットを記した部分(図15の参照番号1503)も更新される。
Assume that CLUT encoded data is stored in the CLUT encoded
ICCプロファイル圧縮データ出力部1310はICCプロファイル圧縮データ形成部1309から出力されるICCプロファイル圧縮データを装置外部へと出力する。ICCプロファイル圧縮データ出力部1310は外部記憶装置へのインターフェースであり、圧縮データをファイルとして格納する。なお、このICCプロファイル圧縮データ出力部1310はネットワークへのインターフェース等であっても良い。
The ICC profile compressed
図16は本第2の実施形態に係る多次元データの符号化装置による符号化処理の流れを示すフローチャートである。以下、図16に示したフローチャートに従い、本第2の実施形態に係る制御部1350のICCプロファイルデータの符号化処理の全体的な流れについて説明する。
FIG. 16 is a flowchart showing the flow of encoding processing by the multidimensional data encoding apparatus according to the second embodiment. The overall flow of the ICC profile data encoding process of the
まず、ICCプロファイル入力部1301は、符号化対象となるICCプロファイルデータを入力し、ICCプロファイル格納用メモリ1302に格納する(ステップS1600)。続いて、タグテーブル解析部1303は、ICCプロファイルデータに格納されている各タグ付き要素データのタイプ判別を行ない、CLUTを含んだタグ付き要素データ(本第2の実施形態ではlut16Typeのタグ付き要素データ)を取り出し、CLUT抽出部1304に出力する。CLUT抽出部1304ではタグ付き要素データの内部からCLUTを抽出し、CLUTの各要素を順番に出力する(ステップS1602)。
First, the ICC
プレーン間差分変換部1306は、CLUT抽出部1304から抽出されるCLUTの要素I0(x,y,z)、I1(x,y,z)、I2(x、y、z)と、プレーンバッファ1305に格納されている直前のプレーンの各要素要素I0(x,y,z−1)、I1(x,y,z−1)、I2(x、y、z−1)とのそれぞれの差分を求め、プレーン間差分D0(x、y、z)、D1(x,y,z)、D2(x、y、z)をJPEG可逆符号化部1307に出力する(ステップS1603)。
The inter-plane
JPEG可逆符号化部1307はプレーン間差分変換部1306からのプレーン間差分値D0(x,y,z)、D1(x、y、z)、D2(x,y,z)を水平方向画素数N、垂直方向画素数N×Nの画像の1画素を構成する3つの成分値とみなして、JPEG可逆符号化(Lossless Process)による符号化処理を行う(ステップS1604)。
The JPEG
CLUTの全ての要素を符号化し終えた場合には処理をステップS1606へと移し、そうでない場合にはステップS1602へと処理を移し、CLUTの次の要素についてステップS1602からステップS1604の処理により符号化を行う(ステップS1605)。 If all the elements of the CLUT have been encoded, the process proceeds to step S1606. If not, the process proceeds to step S1602, and the next element of the CLUT is encoded by the processes from step S1602 to step S1604. Is performed (step S1605).
ステップS1606ではICCプロファイル圧縮データ形成部1309によりICCプロファイル圧縮データの生成が行われる。最後にステップS1607でICCプロファイル圧縮データ出力部1310からICCプロファイル圧縮データが装置外部へと出力される。
In step S1606, the ICC profile compressed
以上の処理により、ICCプロファイルデータの符号化処理が行われ、装置外部へとICCプロファイル圧縮データが出力される。 Through the above processing, the ICC profile data is encoded, and the ICC profile compressed data is output outside the apparatus.
次に、上記のようにして符号化されたICCプロファイルデータを復号する復号装置について説明する。 Next, a decoding apparatus that decodes the ICC profile data encoded as described above will be described.
図17は本第2の実施形態に係る多次元データの復号装置の復号側のブロック構成図である。図17に示すように、本実施形態に係る多次元データの復号装置は、ICCプロファイル圧縮データ入力部1701、ICCプロファイル圧縮データ格納用メモリ1702、タグテーブル解析部1703、CLUT圧縮データ抽出部1704、JPEG可逆符号化データ復号部1705、CLUT要素データ復号部1706、プレーンバッファ1707、CLUT格納用メモリ1708、ICCプロファイルデータ復元部1709、ICCプロファイル出力部1710、そして、装置全体の制御を司る制御部1750を備える。同図において1711、1712は信号線を示す。
FIG. 17 is a block diagram of the decoding side of the multidimensional data decoding apparatus according to the second embodiment. As shown in FIG. 17, the multidimensional data decoding apparatus according to this embodiment includes an ICC profile compressed
以下、図17を参照して、本第2の実施形態に係る多次元データの復号装置の制御部1750が行うICCプロファイルデータの復号処理について説明する。
The ICC profile data decoding process performed by the
本第2の実施形態に係る復号装置は、上述の符号化装置(図13)で生成した図15の構造を有するICCプロファイル圧縮データを入力し、元のICCプロファイルデータを復元する。 The decoding apparatus according to the second embodiment receives the ICC profile compressed data having the structure of FIG. 15 generated by the above-described encoding apparatus (FIG. 13), and restores the original ICC profile data.
まず、ICCプロファイル圧縮データ入力部1701は、復号対象となるICCプロファイル圧縮データを入力する。ICCプロファイル圧縮データ入力部1701は外部記憶媒体へのインターフェース、またはネットワークへのインターフェース等であり、復号対象となるICCプロファイルデータを装置内部に取り込む役割を果たす。ICCプロファイル圧縮データ入力部1701は、入力されるICCプロファイルデータを、一旦、ICCプロファイル格納用メモリ1702に格納する。
First, the ICC profile compressed
ICCプロファイルデータがICCプロファイル圧縮データ格納用メモリ1702に格納されると、タグテーブル解析部1703は、ICCプロファイルのタグテーブルを解析し、lut16Typeのタグ付き要素データを抜き出してCLUT抽出部1704に送る。
When the ICC profile data is stored in the ICC profile compressed
CLUT抽出部1704は、その内部に不図示のバッファを有し、タグテーブル解析部1703により抜き出されたlut16Typeのタグ付き要素データを格納する。lut16Typeのタグ付き要素データはi次元の色空間をo次元の別の色空間に対応付けるものである。ICCプロファイルデータにおいては、3×3配列、1次元入力テーブル、多次元カラールックアップテーブル(CLUT)、1次元出力テーブルで構成される。先に説明したように、ICCプロファイル圧縮データにおいては、このCLUTがJPEG可逆符号化データに置き換えられている。CLUT抽出部1704はlut16Typeのフォーマットに従って、CLUTの配列次元数i,各配列要素の成分数o,各次元の要素数gを取得し、本来CLUTが格納されているべき位置(JPEG可逆符号化データの開始位置に相当)を特定する。
The
JPEG可逆符号化データ復号部1705は、CLUT圧縮データ抽出部1704で指定されるJPEG可逆符号化データの先頭位置からJPEG可逆符号化データの復号処理を開始し、CLUTの各要素のプレーン間差分値D0(x、y、z)、D1(x、y、z)、D2(x、y、z)を順に復号する。
The JPEG lossless encoded
CLUT要素データ復号部1706は、JPEG可逆符号化データ復号部1705により復号されるプレーン間差分値D0(x、y、z)、D1(x、y、z)、D2(x、y、z)について、プレーンバッファ1707からI0(x、y、z−1)、I1(x、y、z−1)、I2(x、y、z−1)を読み出し、上述のプレーン間差分変換部1306(図13)と対になる処理により、着目するCLUTの要素の各成分値I0(x,y,z)、I1(x,y,z)、I2(x、y、z)をそれぞれ復号する。
The CLUT element
プレーンバッファ1707はCLUT要素復号部1706から出力される3次元配列の要素を1プレーン分格納する。なお、説明が前後するが、制御部1750は、復号処理開始時に、プレーンバッファ1705を全ての値を0に初期化する。
The
CLUT格納用メモリ1708には復号されたCLUTの各要素が順次格納される。プレーン間差分からCLUT要素を復号する点を明記するため、プレーンバッファ1707とCLUT格納用メモリ1708を記したが、直前のプレーンの要素値はCLUT格納用メモリ1708にも格納されているので、CLUT格納用メモリ1708のみを有してプレーンバッファ1707の機能を持たせても良い。
Each element of the decrypted CLUT is sequentially stored in the
CLUT格納用メモリ1708にCLUTの全ての要素が格納されると、ICCプロファイル復元部1709は、ICCプロファイル圧縮データ格納用メモリ1702に格納されるICCプロファイル圧縮データと、CLUT格納用メモリ1708に格納されるCLUTデータから必要なデータを取り出し、ICCプロファイルデータを復元して出力する。ICCプロファイルデータはICCプロファイル圧縮データ格納用メモリ1702に格納されるICCプロファイル圧縮データのうち、CLUT圧縮データ抽出部で抽出されたCLUT圧縮データ(JPEG可逆符号化データ)をCLUT格納用メモリに格納されているCLUTデータで置き換えたものである。復元されるICCプロファイルは図14に示した構造をもつICCプロファイルデータである。ICCプロファイル圧縮データ(図15)との違いは、CLUTの復号によりCLUT圧縮データを含むタグ付き要素データ1501(図15)のCLUT圧縮データ部分がCLUT格納用メモリ1708に格納されるCLUTデータによって置き換えられ、図14のようにCLUTを含むタグ付き要素データ1403になる点である。また、CLUTの復号によるタグ付き要素データのサイズ変更に伴い、タグテーブル中、CLUT圧縮データを含むタグ付き要素データのサイズを記した部分(図15の参照番号1502)が書き換えられる。更に、CLUT圧縮データを含むタグ付き要素データの後に続くタグ付き要素データ1504のオフセット位置が変わるため、それらのオフセットを記した部分(図15の参照番号1503)も更新される。
When all the elements of the CLUT are stored in the
ICCプロファイルデータ出力部1710はICCプロファイルデータ復元部1709から出力されるICCプロファイルデータを装置外部へと出力する。ICCプロファイルデータ出力部1710は外部記憶装置へのインターフェースであり、圧縮データをファイルとして格納する。なお、このICCプロファイルデータ出力部1710はネットワークへのインターフェース等であっても良い。
The ICC profile
図18は本実施形態に係る多次元データ処理装置による復号処理の流れを示すフローチャートである。以下、図18に示したフローチャートに従い、本第2の実施形態に係る多次元データの復号装置の制御部1750が行うICCプロファイルデータの符号化処理の全体的な流れについて説明する。
FIG. 18 is a flowchart showing the flow of decoding processing by the multidimensional data processing apparatus according to this embodiment. The overall flow of the ICC profile data encoding process performed by the
まず、制御部1750は、ICCプロファイル圧縮データ入力部1701を制御し、復号対象となるICCプロファイル圧縮データを入力させ、それをICCプロファイル圧縮データ格納用メモリ1702に格納させる(ステップS1800)。続いて、制御部1750は、タグテーブル解析部1703を制御し、ICCプロファイル圧縮データに格納されている各タグ付き要素データのタイプ判別が行わせる。そして、制御部1750は、タグテーブル解析部1703を制御し、CLUT圧縮データを含んだタグ付き要素データ(本実施形態ではlut16Typeのタグ付き要素データ)を取り出させ、CLUT圧縮データ抽出部1704へ出力させる。CLUT抽出部1704は、制御部1750の制御の下で、タグ付き要素データの内部からCLUT圧縮データを抽出し、JPEG可逆符号化データ復号部1705に出力する。JPEG可逆符号化データ復号部1705は、プレーン間差分値D0(x,y,z)、D1(x、y、z)、D2(x,y,z)を順に復号する(ステップS1802)。
First, the
CLUT要素復号部1706は、CLUT要素の各成分I0(x,y,z)、I1(x,y,z)、I2(x、y、z)を復号し(ステップS1803)、復号された要素の各成分はプレーンバッファ1707とCLUT格納用メモリ1708に格納する(ステップS1804)。CLUTの全ての要素を復号し終えた場合には処理をステップS1806へと移し、そうでない場合にはステップS1802へと処理を移し、CLUTの次の要素についてステップS1802からステップS1804の処理により復号処理を行う(ステップS1805)。ステップS1806に処理が進むと、ICCプロファイルデータ復元部1809は、ICCプロファイルデータの復元を行なう。最後にステップS1807でICCプロファイルデータ出力部1810から復元されたICCプロファイルデータが装置外部へと出力される。
The CLUT
以上の処理により、ICCプロファイルデータの復号処理が行われ、装置外部へと復号されたICCプロファイルデータが出力される。 Through the above processing, the ICC profile data is decrypted, and the decrypted ICC profile data is output to the outside of the apparatus.
以上の説明のように、本第2の実施形態に係る多次元データ処理装置では、ICCプロファイルデータに含まれるカラールックアップテーブル(CLUT)をプレーン間差分へ変換した後にJPEG可逆符号化による符号化を行う。ICCプロファイルに含まれるCLUTはプレーン間での予測誤差が近い値をもつ傾向があり、第1の実施形態で述べた効果により圧縮の性能を向上することができる。本実施の形態によれば、プレーン間差分(1次元予測)へ変換後、プレーン内部で平面予測(2次元予測)を適用することで、3次元全ての軸に対して、近隣要素間の相関を利用することができ、高効率な圧縮が可能となる。特に、近隣要素間の相関の高いカラールックアップテーブルの圧縮には有効であると言える。なお、同様の効果をもたらす手法として、プレーン間で2次元予測を用いた誤差に変換した後、プレーン内で前値予測を用いるという場合でも本実施形態と同様の効果を得ることができる。また、本実施の形態の多次元データ処理装置では、カラーマッチングのためのICCプロファイルデータの圧縮に静止画像の可逆符号化方式を用いている。カラー画像の圧縮と、カラーマッチングのための情報(即ちICCプロファイルデータ)の圧縮に同じ方式を用いることで、新たな圧縮方式を必要とせず、簡易にかつ、多次元の相関を有効利用した高効率な符号化が実現できる。本実施形態の場合、機器間でのカラー画像データの受け渡しに際してもJPEG可逆符号化を用いれば良い。反対に例えばJPEG−LSなど、別の可逆符号化方式を適用するのであれば、上述の実施形態においてJPEG可逆符号化に代えて、その符号化方式を適用すれば良い。 As described above, in the multidimensional data processing device according to the second embodiment, the color lookup table (CLUT) included in the ICC profile data is converted into the inter-plane difference and then encoded by JPEG lossless encoding. I do. The CLUT included in the ICC profile tends to have a close prediction error between planes, and the compression performance can be improved by the effects described in the first embodiment. According to the present embodiment, after conversion to inter-plane difference (one-dimensional prediction), by applying plane prediction (two-dimensional prediction) inside the plane, correlation between neighboring elements for all three-dimensional axes. Can be used, and highly efficient compression becomes possible. In particular, it can be said that it is effective for compression of a color lookup table having a high correlation between neighboring elements. Note that, as a technique that brings about the same effect, the same effect as in the present embodiment can be obtained even when the previous value prediction is used within a plane after conversion into an error using two-dimensional prediction between the planes. In the multidimensional data processing apparatus according to the present embodiment, a lossless encoding method for still images is used for compression of ICC profile data for color matching. By using the same method for compression of color images and information for color matching (ie, ICC profile data), a new compression method is not required, and simple and effective use of multidimensional correlation is achieved. Efficient encoding can be realized. In the case of the present embodiment, JPEG lossless encoding may be used when transferring color image data between devices. On the other hand, if another lossless encoding method such as JPEG-LS is applied, the encoding method may be applied instead of JPEG lossless encoding in the above-described embodiment.
また、上記第2の実施形態は、第1の実施形態の変形例と同様、コンピュータが該当するプログラムを実行することでも実施できる。この場合、そのコンピュータプログラムは、図13、17に示すような各構成に対応するモジュールを備え、メイン処理では図16、18の処理を行なえばよいのは容易に理解できよう。 Moreover, the said 2nd Embodiment can be implemented also by running the program which a computer corresponds similarly to the modification of 1st Embodiment. In this case, the computer program includes modules corresponding to the respective configurations as shown in FIGS. 13 and 17, and it can be easily understood that the processing of FIGS. 16 and 18 may be performed in the main processing.
<第3の実施形態>
第2の実施形態では、CLUTが3次元、3成分である場合について説明した。しかしながら、4次元や4成分であっても本発明は適用可能である。また、第2の実施形態では、3次元データのz軸を固定してプレーンを定義したが、多次元データのスキャン順序としては複数の方法が考えられ、上述の例に限定されるものではない。第3の実施形態では、ICCプロファイルデータの中の4次元3成分のカラールックアップテーブルを例に、複数のスキャン順序のうち、符号量が少なくなるスキャン順序を選択して適用する例について説明する。
<Third Embodiment>
In the second embodiment, the case where the CLUT is three-dimensional and three-component has been described. However, the present invention can also be applied to four dimensions or four components. In the second embodiment, the plane is defined by fixing the z-axis of the three-dimensional data. However, a plurality of methods can be considered as the scan order of the multidimensional data, and the present invention is not limited to the above example. . In the third embodiment, an example of selecting and applying a scan order in which the code amount decreases among a plurality of scan orders will be described using a four-dimensional three-component color lookup table in ICC profile data as an example. .
図20に本第3の実施形態に係る符号化装置のブロック構成図を示す。同図に示す通り、第2の実施形態で説明した図13のCLUT抽出部1304を、動作の異なるCLUT抽出部2001に置き換え、さらにスイッチ2002、予測誤差絶対値平均算出部2003を追加した構成となっている。
FIG. 20 shows a block configuration diagram of an encoding apparatus according to the third embodiment. As shown in the figure, the
以下、第2の実施形態と共通のブロックについては説明を省略し、動作の異なる点について説明する。 In the following, description of blocks common to the second embodiment will be omitted, and differences in operation will be described.
先に述べたように、本第3の実施形態では4次元3成分のCLUTを例に説明する。第2の実施形態と同様に各次元の要素数g=Nであるとする。つまり、CLUTが有する要素数はN×N×N×N個であり、成分の総数はN×N×N×N×3である。 As described above, in the third embodiment, a four-dimensional three-component CLUT will be described as an example. As in the second embodiment, it is assumed that the number of elements g in each dimension is g = N. That is, the number of elements that the CLUT has is N × N × N × N, and the total number of components is N × N × N × N × 3.
CLUT抽出部2001はその内部に不図示のバッファを有し、タグテーブル解析部1303により抜き出されたlut16Typeのタグ付き要素データを格納する。lut16Typeのタグ付き要素データはi次元の色空間をo次元の別の色空間に対応付けるものであり、3×3配列、1次元入力テーブル、多次元カラールックアップテーブル(CLUT)、1次元出力テーブルで構成される。CLUTはi次元の配列であり、各配列要素がo個の成分値を有する。lut16Typeのタグ付き要素データには付加情報として、i、oの他、CLUTの各次元の要素数gが記される。CLUT抽出部1304はlut16Typeのフォーマットに従って、i,o,gを取得し、CLUTの各要素の各成分を順番にプレーン間差分変換部1306へ出力する。先に説明した第2の実施形態では、X,Y,Zの3軸で表現される3次元のCLUTの圧縮について述べたが、本実施形態では、W,X,Y,Zの4軸で表現される4次元のCLUTの圧縮を行う。各次元の要素数g=Nである場合、W軸の値を0からN−1まで変化させて得られるX,Y,Zの3次元データN個について符号化処理を行う。
The
以下、個々の3次元データの処理について述べる。 Hereinafter, processing of individual three-dimensional data will be described.
本第3の実施形態におけるCLUT抽出部1304では1つの3次元データについて、走査順序を決定する目的で3次元データの要素を読み出す「前走査」と、実際に符号化を行うために読み出す「本走査」を行う。
In the third embodiment, the
前走査では、走査順序を変えて3回の読み出しを行う。まず、第1回目の前走査の読み出しでは、図19(a)に示すように、Z軸を固定して得られるXYプレーンをZ軸の値N−1から0まで降順に読み出す。第2回目の前走査の読み出しでは、図19(b)に示すように、Y軸を固定して得られるXZプレーンをY軸の値N−1から0まで順番に読み出す。また、第3回目の前走査の読み出しでは、図19(c)に示すように、X軸を固定して得られるYZプレーンをX軸の値N−1から0まで順番に読み出す。 In pre-scanning, reading is performed three times by changing the scanning order. First, in the first pre-scan reading, as shown in FIG. 19A, the XY plane obtained by fixing the Z axis is read in descending order from the value N−1 of the Z axis to 0. In the second pre-scan reading, as shown in FIG. 19B, XZ planes obtained by fixing the Y axis are read in order from the Y axis values N-1 to 0. In the third pre-scan reading, as shown in FIG. 19C, the YZ plane obtained by fixing the X axis is sequentially read from the X axis value N-1 to 0.
なお、1つのプレーンを表わす2つの軸をA,Bと定義したとき、そのプレーン内を走査する順序は、B軸の値を0に固定にし、Aの軸の座標の値を0、1、…、N−1に変化させる。そして、A軸の座標の値がN−1に到達したとき、B軸の値を1だけ加算し、Aの軸の座標の値を0、1、…、N−1に変化させる。以下、これをB軸の値がN−1、A軸の値がN−1になるまで繰り返すものとする。すなわち、B軸の値をA軸の値よりも優先して変化させるものとする。しかしながら、この逆、すなわち、A軸の値をB軸の値よりも優先しても構わない。 When two axes representing one plane are defined as A and B, the order of scanning in the plane is such that the value of the B axis is fixed to 0 and the coordinate value of the A axis is set to 0, 1, ..., changed to N-1. When the value of the A-axis coordinate reaches N−1, the value of the B-axis is incremented by 1, and the value of the A-axis coordinate is changed to 0, 1,. Hereinafter, this is repeated until the value of the B axis is N-1 and the value of the A axis is N-1. That is, the B-axis value is changed with priority over the A-axis value. However, the opposite, that is, the value of the A axis may be given priority over the value of the B axis.
さて、本走査では、前走査で行った3回の読み出しのいずれかひとつと同じ読み出し方で配列要素の読み出しを行う。走査方法の選択は後述する予測誤差絶対値平均算出部2003から出力される制御信号に基づく。予測誤差絶対値平均算出部2003から信号線2004を介して入力される制御信号が0である場合、前走査における第1回目の読み出しと同じ走査方法で読み出すことで本走査を行なう。また、制御信号が1である場合には第2回目と、また、制御信号が2である場合には第3回目と同じ走査方法で読み出すことで本走査を行なう。
Now, in the main scan, the array elements are read in the same way as any one of the three readings performed in the previous scan. The selection of the scanning method is based on a control signal output from the prediction error absolute value
先ず、前走査を更に詳しく説明する。 First, the pre-scan will be described in more detail.
プレーンバッファ1305はCLUT抽出部1304から出力される3次元配列の要素を1プレーン分格納する。プレーンの概念は第2実施形態と同じであるが、第2の実施形態ではZ軸を固定して形成されるXYプレーンが格納されたのに対し、本第3の実施形態では、固定する軸を変えて3回の読み出しが行われるため、第1回目の読み出しではXYプレーン、第2回目の読み出しではXZプレーン、第3回目ではYZプレーンと格納されるプレーンが変わる。ただし、プレーンバッファ1305は3回の読み出しの開始時点で全ての値を0に初期化される。
The
プレーン間差分変換部1306は第2の実施形態と同様にCLUT抽出部1304から出力されるIn(x,y,z)(nは0,1,2のいずれか)について、プレーンバッファ1305から当該成分値の直前のプレーンの値を読み出す。ここで直前のプレーンの値とは、第1回目の前走査の読み出しにおいてはIn(x、y, z+1)である。第2回目の前走査の読み出しではIn(x, y+1, z)、そして、第3回目の前走査の読出しではIn(x+1,y, z)である。 そして、プレーン間差分変換部1306は、プレーン間差分値Dn(x、y、z)を生成し、出力する。具体的には以下の式を用いる。
・第1回目の前走査の読み出しの場合:
Dn(x、y、z)=Mod(In(x、y、z)−In(x、y、z+1)+(2^15),(2^16))
・第2回目の前走査の読み出しの場合:
Dn(x、y、z)=Mod(In(x、y、z)−In(x、y+1、z)+(2^15),(2^16))
・第3回目の前走査の読み出しの場合:
Dn(x、y、z)=Mod(In(x、y、z)−In(x+1、y、z)+(2^15),(2^16))
Similar to the second embodiment, the inter-plane
・ In the case of the first pre-scan reading:
Dn (x, y, z) = Mod (In (x, y, z) -In (x, y, z + 1) + (2 ^ 15), (2 ^ 16))
・ In the case of the second pre-scan reading:
Dn (x, y, z) = Mod (In (x, y, z) -In (x, y + 1, z) + (2 ^ 15), (2 ^ 16))
・ In the case of the third pre-scan reading:
Dn (x, y, z) = Mod (In (x, y, z) -In (x + 1, y, z) + (2 ^ 15), (2 ^ 16))
スイッチ2002はCLUT抽出部2001において前走査が行われている間は、端子Ta側に接続され、本走査を行う際には端子Tb側に接続される。
The
予測誤差絶対値平均算出部2003は前走査における3回の前走査の読み出しのそれぞれについて、プレーン間差分変換部1306で生成されるプレーン間差分値Dn(x,y,z)を水平方向画素数N,垂直方向画素数NxNの3成分、16ビットの画像データとみなし、JPEGの可逆符号化における予測式の選択番号m=4、すなわち、Px=Ra+Rb−Rcを使用した場合の予測誤差を求め、その絶対値平均を求める。第1回目、第2回目、第3回目の前走査の読み出しについて、それぞれ予測誤差の絶対値平均値を求めることになる。前走査における3回の読み出しそれぞれの、予測誤差の絶対値平均値を算出すると、それら3つ絶対値平均値を比較する。そして、予測誤差が最小となる前走査の読み出しが何回目であったのかを示す制御信号を信号線2004へと出力する。
The prediction error absolute value
ここで、3回の前走査の絶対平均値のうち、第1回目の前走査の読み出しによる絶対値平均が最小となる場合には、予測誤差絶対値平均値算出部2003は、制御信号2004に“0”を出力する。また、絶対値平均が最小が、第2回目の前走査の読出しであった場合には“1”、第3回目の前走査の読出しであった場合には“2”を制御信号2004として出力する。
Here, when the absolute value average by the first pre-scan reading out of the absolute average values of the three previous scans is minimized, the prediction error absolute value average
ここで算出している3つの予測誤差絶対値平均について説明する。図21(a)乃至(c)における黒丸が3次元データの着目する要素であるとする。第1回目の前走査の読み出し時における予測誤差絶対平均値は、図21(a)に斜線でしめした7個の要素を参照して予測した誤差の絶対値平均を示す。第2回目の前走査の読み出し時における予測誤差絶対平均値は図21(b)の斜線で示した7個の要素を参照した予測誤差の絶対値平均である。そして、第3回目の前走査の読み出し時における予測誤差絶対平均値は図21(c)の斜線で示した7個の要素を参照した予測誤差の絶対値平均である。 The three prediction error absolute value averages calculated here will be described. Assume that the black circles in FIGS. 21A to 21C are elements of interest in the three-dimensional data. The prediction error absolute average value at the time of reading of the first pre-scan shows the absolute value average of errors predicted with reference to the seven elements shown by hatching in FIG. The prediction error absolute average value at the time of the second pre-scan reading is the absolute value average of the prediction error with reference to the seven elements indicated by hatching in FIG. Then, the prediction error absolute average value at the time of the third pre-scan reading is the absolute value average of the prediction error with reference to the seven elements indicated by diagonal lines in FIG.
本来、3次元データの各要素について、ある着目する要素とその隣接要素を頂点とする立方体を考えるならば、8通りのやり方があるが、本実施形態ではそのうちの3通りについて予測誤差の絶対値が最小となる走査方法を探索している。もちろん、言うまでもなく、前走査の読み出し回数を増やし、全ての方法について探索するようにしても構わない。 Originally, for each element of the three-dimensional data, there are eight ways to consider a cube having a certain element of interest and its neighboring elements as vertices. In the present embodiment, the absolute value of the prediction error for three of them. Searching for a scanning method that minimizes. Of course, it goes without saying that the number of pre-scanning readings may be increased to search for all methods.
3回の前走査における読み出しが終了し、予測誤差絶対値平均算出部2003から制御信号が出力されると、制御部1350は、スイッチ2002の出力を端子Tbへと切り替える。そして、CLUT抽出部2001は本走査を開始する。先に述べた通り、制御信号2004が“0”の場合には第1回目の前走査の読み出し方と同じ走査方法を用いる。また、制御信号2004が“1”の場合には第2回目の前走査の読出し方、“2”の場合には第3回目の前走査の読み出し方に従って走査を行う。
When the readout in the three pre-scans is completed and a control signal is output from the prediction error absolute value
JPEG可逆符号化部1307は、第2の実施形態と同様に、プレーン間差分変換部1306から順次入力されるN×N×N個の要素(1つの要素は3成分であり各々は16ビット)のプレーン間差分値Dn(x、y、z)を水平方向画素数N、垂直方向画素数N×Nの3成分、16ビットの画像データとしてJPEGに規定される可逆符号化(Lossless Process)により符号化し、符号化データをCLUT符号化データ格納用メモリ1308に格納する。JPEGの可逆符号化で用いる予測式についても第2の実施形態と同じく選択番号m=4、すなわち、Px=Ra+Rb−Rcを使用する(詳しくは、規格書のAnnex H Table H.1 - Predictors for lossless codingを参照されたい)。なお、復号時に符号化と同じ走査順序で復号されるよう、符号量が最小となった走査順序に関する情報を、例えば、JPEGのAPPマーカやCOMマーカなどを利用して符号化データ内部に保持するものとする。
The JPEG
上述の処理を4次元のCLUTの1軸を固定して得られるN個の3次元データに対して繰り返して行うことにより、N個のJPEG圧縮データが生成され、格納される。なお、本第3の実施形態では、N個の3次元データについて符号量が最小となると思われる走査方法を探索するという都合上、N個の符号化データを生成する方法について述べたが、第2の実施形態のように固定された走査方法で3次元データを読み出す場合には、必ずしもN個の符号化データとして分ける必要はなく、例えば水平方向画素数N、垂直方向画素数N×N×Nの画像データとして1つの符号化データにまとめるようにしても構わない。 N JPEG compressed data is generated and stored by repeatedly performing the above processing on N three-dimensional data obtained by fixing one axis of a four-dimensional CLUT. In the third embodiment, a method for generating N encoded data has been described for the sake of exploring a scanning method that seems to have the smallest code amount for N three-dimensional data. When three-dimensional data is read by a fixed scanning method as in the second embodiment, it is not always necessary to divide the data into N pieces of encoded data. For example, the number of horizontal pixels N and the number of vertical pixels N × N × N encoded image data may be combined into one encoded data.
なお、本第3の実施形態で生成したICCプロファイル圧縮データは、元が4次元のCLUTであるために、N個の3次元データとして符号化されていること、それぞれの3次元データに対する走査方法が可変となっているが、符号化データから読み出される走査順序に関する情報に基づいてデータを復元し、符号化時と逆の処理でN個の3次元データから4次元データへと復元すれば、第2の実施形態で説明した復号装置とほぼ同じ構成で復号できる。従って、その復号処理についての説明を省略する。 Note that since the ICC profile compressed data generated in the third embodiment is originally a four-dimensional CLUT, it is encoded as N three-dimensional data, and a scanning method for each three-dimensional data. However, if the data is restored based on the information regarding the scanning order read from the encoded data, and is restored from the N three-dimensional data to the four-dimensional data by the reverse process of the encoding, Decoding can be performed with substantially the same configuration as the decoding device described in the second embodiment. Therefore, description of the decoding process is omitted.
以上述べたように、本第3の実施形態では多次元データを2次元化して符号化する際の走査方法について、符号量が少なくなる方法を選択して適用する方法を用いることで、更なる圧縮性能の向上を図っている。 As described above, in the third embodiment, a method of selecting and applying a method that reduces the amount of code is used as a scanning method when two-dimensionally encoding multidimensional data. The compression performance is improved.
<他の実施形態>
本発明は上述した実施の形態に限定されるものではない。例えば、第2の実施形態ではカラールックアップテーブル(CLUT)をJPEGに規定される可逆符号化(Lossless Process)により符号化する例を示した。しかし、これ以外として、JPEG−LS Baseline方式(ITU−T T.87|ISO/IEC14495)など、その他の符号化技術を用いても構わない。また、上述の実施形態では特に言及しなかったが、JPEGの可逆符号化を用いる場合、ハフマン符号の最適化を適用しても良いし、あらかじめ定めたハフマンテーブルを用いる構成としても良い。
<Other embodiments>
The present invention is not limited to the embodiment described above. For example, in the second embodiment, an example in which a color look-up table (CLUT) is encoded by a lossless process defined in JPEG is shown. However, other encoding techniques such as JPEG-LS Baseline system (ITU-T T.87 | ISO / IEC14495) may be used. Although not specifically mentioned in the above-described embodiment, when JPEG lossless encoding is used, optimization of Huffman code may be applied, or a configuration using a predetermined Huffman table may be employed.
また、第2の実施形態で、CLUTが3次元、3成分である場合、第3の実施形態ではCLUTが4次元、3成分である場合を例に説明した。しかしながら、4次元以上の次元数であったり、4成分であっても適用可能である。例えば、例えば5次元4成分、各次元の要素数がNであるCLUTの場合、軸を2つを固定して定義されるN×N×Nの4成分の3次元データがN×N個存在するものとみなして圧縮するといった具合に適用すれば良い。
Further, in the second embodiment, the case where the CLUT has three dimensions and three components is described, and in the third embodiment, the case where the CLUT has four dimensions and three components has been described as an example. However, it is applicable even if the number of dimensions is four or more or four components. For example, in the case of a CLUT with 5 dimensions and 4 components and the number of elements in each dimension is N, there are N ×
なお、第2の実施形態のように複数成分を有する多次元データを符号化対象とする場合、更なる可逆符号化の性能向上を図るには、複数成分間での可逆の色変換処理を適用して、成分間の相関を除去するなどの処理を適用しても良い。 When multidimensional data having a plurality of components is to be encoded as in the second embodiment, a reversible color conversion process between a plurality of components is applied to further improve the lossless encoding performance. Then, processing such as removing the correlation between components may be applied.
また、同じく第2の実施形態でICCプロファイルデータをICCプロファイル圧縮データへの符号化する例について述べたが、CLUT圧縮データを必ずしも同じファイル内に収める必要はない。例えば、符号化対象のICCプロファイルデータからCLUTを抜き取ったものと、CLUT圧縮データとを別ファイルとして持つようにしても構わない。更には、複数のICCプロファイルを圧縮する場合など、これらの圧縮データを一つのファイルとして格納したり、共通のタグ付き要素データを共有するようにしても構わない。 以上の説明から明らかなように、本発明は、3次元以上のルックアップテーブルを圧縮する場合に、好適なものであることが理解できよう。 Similarly, in the second embodiment, the example in which the ICC profile data is encoded into the ICC profile compressed data has been described. However, it is not always necessary to store the CLUT compressed data in the same file. For example, the CLUT extracted from the encoding target ICC profile data and the CLUT compressed data may be provided as separate files. Further, when compressing a plurality of ICC profiles, the compressed data may be stored as one file, or common tagged element data may be shared. As is apparent from the above description, it can be understood that the present invention is suitable for compressing a lookup table having three or more dimensions.
また、上記各実施形態からも明らかなように、本発明はコンピュータプログラムをもその範疇とするものである。通常、コンピュータプログラムはCD−ROM等のコンピュータ可読記憶媒体に格納されて、コンピュータのシステムにコピーもしくはインストールすることで実行可能となる。従って、このようなコンピュータ可読記憶媒体も本発明の範疇にあることも明らかである。 Further, as is clear from the above embodiments, the present invention also includes computer programs. Usually, a computer program is stored in a computer-readable storage medium such as a CD-ROM, and can be executed by copying or installing it in a computer system. Therefore, it is obvious that such a computer-readable storage medium is also within the scope of the present invention.
Claims (16)
前記多次元空間の1つの次元の軸の値αを順番に更新し、各αごとに2次元のデータ集合I(α)を入力する入力手段と、
入力した2次元のデータ集合I(α)を構成する各要素データと、1つ前に入力した2次元のデータ集合I(α-1)を構成する各要素データとの同じ2次元座標位置どうしの差分を示す、前記Nビットで表わされる要素差分データを算出し、当該要素差分データで構成される2次元の差分要素データ集合D(α)を生成する生成手段と、
該生成手段により生成された、2次元の差分要素データ集合D(α)を、当該2次元の差分要素データ集合D(α)内で予測符号化する符号化手段とを備え、
前記生成手段は、
前記データ集合I(α)と、前記1つ前に入力したデータ集合I(α-1)の同じ2次元座標位置の値をそれぞれV(α)、V(α−1)とし、整数xを整数yで除算したときの余りを返す関数をMod{x,y}とした場合、前記差分要素データ集合D(α)の前記2次元座標における該当する差分要素データの値Dvを、
Dv=Mod{V(α)−V(α−1)+2 N-1 、2 N }
として算出することで、前記差分要素データDvを、符号化対象の要素データと同じNビットにマッピングする
ことを特徴とする符号化装置。 An encoding device that losslessly encodes element data represented by N bits and having a non-negative value in a multidimensional space represented by M (M ≧ 3) dimensions,
Input means for sequentially updating the value α of one dimension axis of the multidimensional space and inputting a two-dimensional data set I (α) for each α;
The same two-dimensional coordinate positions of each element data constituting the input two-dimensional data set I (α) and each element data constituting the previous two-dimensional data set I (α-1) Generating means for calculating element difference data represented by the N bits and indicating a difference of the two-dimensional difference element data set D (α) composed of the element difference data;
Encoding means for predictively encoding the two-dimensional difference element data set D (α) generated by the generation means within the two-dimensional difference element data set D (α) ;
The generating means includes
The values of the same two-dimensional coordinate positions of the data set I (α) and the previous data set I (α-1) input are V (α) and V (α-1), respectively, and the integer x is When the function that returns the remainder when dividing by the integer y is Mod {x, y}, the value Dv of the corresponding difference element data in the two-dimensional coordinates of the difference element data set D (α) is
Dv = Mod {V (α) −V (α−1) +2 N−1 , 2 N }
As a result, the difference element data Dv is mapped to the same N bits as the element data to be encoded.
差分要素データ集合D(α)中の着目している要素差分データをDiとし、当該着目している要素差分データDiの近傍に位置し、符号化処理済みの3つの要素差分データをDa,Db,Dcとしたとき、
着目している要素差分データDiに対する予測値pを次式に従って算出し、
p=Da+Db−Dc
着目している要素差分データDiと前記予測値pとの差である予測誤差を符号化する
ことを特徴とする請求項1又は2に記載の符号化装置。 The encoding means includes
The element difference data of interest in the difference element data set D (α) is set to Di, and the three element difference data that are located in the vicinity of the element difference data Di of interest and have been subjected to the encoding process are represented by Da and Db. , Dc,
The predicted value p for the element difference data Di of interest is calculated according to the following equation:
p = Da + Db-Dc
The encoding apparatus according to claim 1, wherein a prediction error that is a difference between the element difference data Di of interest and the predicted value p is encoded.
更に、前記カラープロファイルデータからカラールックアップテーブルを抽出するCLUT抽出手段と、
前記符号化手段により得られる多次元データの符号化データで、前記カラープロファイルデータに含まれるカラールックアップテーブルを置き換える更新手段と
を備えることを特徴とする請求項1乃至3のいずれか1項に記載の符号化装置。 The multidimensional space to be encoded is a color lookup table included in color profile data for conversion between two different color spaces,
A CLUT extraction means for extracting a color lookup table from the color profile data;
The update means for replacing a color lookup table included in the color profile data with encoded data of multidimensional data obtained by the encoding means, according to any one of claims 1 to 3, The encoding device described.
前記多次元空間の1つの次元の軸の値αを順番に更新し、各αごとに2次元のデータ集合I(α)を入力する入力工程と、
入力した2次元のデータ集合I(α)を構成する各要素データと、1つ前に入力した2次元のデータ集合I(α-1)を構成する各要素データとの同じ2次元座標位置どうしの差分を示す、前記Nビットで表わされる要素差分データを算出し、当該要素差分データで構成される2次元の差分要素データ集合D(α)を生成する生成工程と、
該生成工程により生成された、2次元の差分要素データ集合D(α)を、当該2次元の差分要素データ集合D(α)内で予測符号化する符号化工程とを備え、
前記生成工程は、
前記データ集合I(α)と、前記1つ前に入力したデータ集合I(α-1)の同じ2次元座標位置の値をそれぞれV(α)、V(α−1)とし、整数xを整数yで除算したときの余りを返す関数をMod{x,y}とした場合、前記差分要素データ集合D(α)の前記2次元座標における該当する差分要素データの値Dvを、
Dv=Mod{V(α)−V(α−1)+2 N-1 、2 N }
として算出することで、前記差分要素データDvを、符号化対象の要素データと同じNビットにマッピングする
ことを特徴とする符号化装置の制御方法。 A control method of an encoding device that performs lossless encoding of element data represented by N bits and having a non-negative value in a multidimensional space represented by M (M ≧ 3) dimensions,
An input step of sequentially updating one-dimensional axis value α of the multidimensional space and inputting a two-dimensional data set I (α) for each α;
The same two-dimensional coordinate positions of each element data constituting the input two-dimensional data set I (α) and each element data constituting the previous two-dimensional data set I (α-1) shows the difference, a generation step of the calculating element difference data represented by N bits to produce a two-dimensional element difference data set D (alpha) comprised in the element difference data,
An encoding step of predictively encoding the two-dimensional difference element data set D (α) generated by the generation step in the two-dimensional difference element data set D (α) ,
The generating step includes
The values of the same two-dimensional coordinate positions of the data set I (α) and the previous data set I (α-1) input are V (α) and V (α-1), respectively, and the integer x is When the function that returns the remainder when dividing by the integer y is Mod {x, y}, the value Dv of the corresponding difference element data in the two-dimensional coordinates of the difference element data set D (α) is
Dv = Mod {V (α) −V (α−1) +2 N−1 , 2 N }
By calculating as above, the difference element data Dv is mapped to the same N bits as the element data to be encoded.
符号化データを入力する入力手段と、
入力した符号化データを復号し、差分要素データ集合D(α)を生成する第1の復号手段と、
1つ前に復号したデータ集合I(α−1)と、前記第1の復号手段で生成された差分要素データ集合D(α)とを加算することで、着目データ集合D(α)を生成する第2の復号手段と
を備えることを特徴とする復号装置。 A decoding device that decodes encoded data generated by the encoding device according to claim 1,
Input means for inputting encoded data;
First decoding means for decoding the input encoded data and generating a difference element data set D (α);
The data set I (α-1) decoded one before and the difference element data set D (α) generated by the first decoding means are added to generate the data set D (α) of interest. And a second decoding means.
差分要素データ集合D(α)中の着目データをDiとし、当該着目データの近傍に位置し、復号済みのデータをDa,Db,Dcとしたとき、
着目データDiに対する予測値pを次式で算出し、
p=Da+Db−Dc
着目データDiの値と前記予測値pとの和を算出することで、前記差分要素データ集合D(α)中の着目位置のデータを復号する
ことを特徴とする請求項10に記載の復号装置。 The first decoding means includes
When the data of interest in the difference element data set D (α) is Di, and is located near the data of interest and the decoded data is Da, Db, Dc,
The predicted value p for the data of interest Di is calculated by the following formula,
p = Da + Db-Dc
The decoding device according to claim 10, wherein the data of the position of interest in the difference element data set D (α) is decoded by calculating the sum of the value of the data of interest Di and the predicted value p. .
更に、カラープロファイルデータからカラールックアップテーブルの符号化データを抽出する抽出手段と、
前記第2の復号手段により復号された多次元データで、カラープロファイルデータに含まれるカラールックアップテーブルの前記符号化データを置き換えてカラープロファイルデータを復元する更新手段と
を備えることを特徴とする請求項10又は11に記載の復号装置。 The encoded data to be decoded is encoded data of a color lookup table included in color profile data indicating correspondence between two different color spaces,
And extraction means for extracting encoded data of the color lookup table from the color profile data;
And updating means for restoring the color profile data by replacing the encoded data of the color look-up table included in the color profile data with the multidimensional data decoded by the second decoding means. Item 12. The decoding device according to Item 10 or 11.
符号化データを入力する入力工程と、
入力した符号化データを復号し、差分要素データ集合D(α)を生成する第1の復号工程と、
1つ前に復号したデータ集合I(α−1)と、前記第1の復号工程で生成された差分要素データ集合D(α)とを加算することで、着目データ集合D(α)を生成する第2の復号工程と
を備えることを特徴とする復号装置の制御方法。 A control method for a decoding device for decoding encoded data generated by the encoding device according to claim 1, comprising:
An input process for inputting encoded data;
A first decoding step of decoding the input encoded data and generating a difference element data set D (α);
The data set I (α-1) decoded previously and the difference element data set D (α) generated in the first decoding step are added to generate the data set D (α) of interest. A decoding method comprising: a second decoding step.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008037951A JP4996501B2 (en) | 2007-04-06 | 2008-02-19 | Multidimensional data encoding apparatus, decoding apparatus, and control method therefor |
CN2008100900809A CN101282410B (en) | 2007-04-06 | 2008-04-02 | Multidimensional data encoding apparatus and decoding apparatus, and control method thereof |
EP08154015.5A EP1978749B1 (en) | 2007-04-06 | 2008-04-03 | Compression of multidimensional look-up tables for colour space conversion |
US12/062,907 US8213729B2 (en) | 2007-04-06 | 2008-04-04 | Multidimensional data encoding apparatus and decoding apparatus, and control method thereof |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007101048 | 2007-04-06 | ||
JP2007101048 | 2007-04-06 | ||
JP2008037951A JP4996501B2 (en) | 2007-04-06 | 2008-02-19 | Multidimensional data encoding apparatus, decoding apparatus, and control method therefor |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008278464A JP2008278464A (en) | 2008-11-13 |
JP4996501B2 true JP4996501B2 (en) | 2012-08-08 |
Family
ID=40014668
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008037951A Expired - Fee Related JP4996501B2 (en) | 2007-04-06 | 2008-02-19 | Multidimensional data encoding apparatus, decoding apparatus, and control method therefor |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP4996501B2 (en) |
CN (1) | CN101282410B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101767950B1 (en) | 2009-11-24 | 2017-08-14 | 에스케이텔레콤 주식회사 | Apparatus and Method for extracting correlation parameters between color planes to make prediction image in video codec, and Video Encoding/Decoding Apparatus and Method using the same |
WO2011065728A2 (en) * | 2009-11-24 | 2011-06-03 | 에스케이텔레콤 주식회사 | Device and method for extracting correlation parameters between colour planes for prediction, and a recording medium for the same |
JP2012044502A (en) * | 2010-08-20 | 2012-03-01 | Tomey Corporation | Medical color image compression method |
KR101355570B1 (en) * | 2012-07-13 | 2014-01-27 | (주)자인미디어 | Apparatus and method for compressing look up table |
US10271034B2 (en) * | 2013-03-05 | 2019-04-23 | Qualcomm Incorporated | Simplified depth coding |
CN109951714B (en) | 2013-04-08 | 2022-11-11 | 杜比国际公司 | Method for encoding and decoding a LUT and corresponding devices |
KR102028186B1 (en) * | 2013-09-20 | 2019-10-02 | 브이아이디 스케일, 인크. | Systems and methods for providing 3d look-up table coding for color gamut scalability |
JP6661285B2 (en) * | 2014-06-02 | 2020-03-11 | 三星ディスプレイ株式會社Samsung Display Co.,Ltd. | Display panel, method of compensating pixel luminance of display panel and method of compensating pixel parameters |
DK3166795T3 (en) * | 2015-05-15 | 2019-02-18 | Hewlett Packard Development Co | PRINTER CARTRIDGES AND MEMORY UNITS CONTAINING COMPRESSED MULTI-DIMENSIONAL COLOR TABLES |
WO2018009226A1 (en) * | 2016-07-08 | 2018-01-11 | Hewlett-Packard Development Company, L.P. | Color look up table compression |
CN106534874B (en) * | 2016-11-18 | 2019-11-29 | 上海兆芯集成电路有限公司 | The compression of texture brick and decompression method and the device using this method |
CN110753224B (en) * | 2018-07-23 | 2022-02-01 | 中国石油化工股份有限公司 | Data rearrangement method and system for measurement while drilling data compression |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1330129A3 (en) * | 1991-04-10 | 2006-03-15 | Mitsubishi Denki Kabushiki Kaisha | Encoder and Decoder |
JP3131305B2 (en) * | 1992-09-30 | 2001-01-31 | 富士通株式会社 | Method and apparatus for orthogonal transformation encoding of three-dimensional volume data |
US5883976A (en) * | 1994-12-28 | 1999-03-16 | Canon Kabushiki Kaisha | Selectively utilizing multiple encoding methods |
JPH1117971A (en) * | 1997-06-24 | 1999-01-22 | Canon Inc | Image processor, its method, data processing method and storage medium |
JPH11146396A (en) * | 1997-11-13 | 1999-05-28 | Nippon Telegr & Teleph Corp <Ntt> | Moving image compression coding/decoding method, moving image compression coder/decoder, moving image coding transmission method/system, and recording medium for moving image compression coding/decoding program |
JP2002209114A (en) * | 2000-12-28 | 2002-07-26 | Canon Inc | Method for storing color conversion table and image processing apparatus |
JP2002218208A (en) * | 2001-01-16 | 2002-08-02 | Sharp Corp | Image processor and image formation device provide with the same |
JP3504256B1 (en) * | 2002-12-10 | 2004-03-08 | 株式会社エヌ・ティ・ティ・ドコモ | Video encoding method, video decoding method, video encoding device, and video decoding device |
JP2005303576A (en) * | 2004-04-09 | 2005-10-27 | Sony Corp | Image signal processing apparatus and method, recording medium, program, and video camera |
-
2008
- 2008-02-19 JP JP2008037951A patent/JP4996501B2/en not_active Expired - Fee Related
- 2008-04-02 CN CN2008100900809A patent/CN101282410B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008278464A (en) | 2008-11-13 |
CN101282410A (en) | 2008-10-08 |
CN101282410B (en) | 2010-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4996501B2 (en) | Multidimensional data encoding apparatus, decoding apparatus, and control method therefor | |
EP1978749B1 (en) | Compression of multidimensional look-up tables for colour space conversion | |
US6985630B2 (en) | Image processing apparatus and method, program and storage medium | |
KR100415878B1 (en) | Image encoding method and image decoding method | |
KR20120065394A (en) | Image processing apparatus and processing method therefor | |
JP4522199B2 (en) | Image encoding apparatus, image processing apparatus, control method therefor, computer program, and computer-readable storage medium | |
JP5158096B2 (en) | Encoding data generation apparatus, encoding data generation method, decoding apparatus, and decoding method | |
KR100475041B1 (en) | Image information high-speed compressing method and real-time moving picture transferring method using the same | |
JP2011254405A (en) | Image processor and image processing method | |
JP4633576B2 (en) | Data compression apparatus and data compression program | |
JP2004201302A (en) | Image resolution conversion method | |
JP2003189109A (en) | Image processor and image processing method, and computer program | |
JP3346051B2 (en) | Image processing device | |
US8494261B2 (en) | Image processing apparatus, image processing method, and computer-readable medium | |
US20050238245A1 (en) | Image compression/decompression apparatus and method | |
JP4629512B2 (en) | Data compression apparatus and data compression program | |
JP4699307B2 (en) | Data compression apparatus and data compression program | |
JP4696738B2 (en) | Image data compression method and apparatus, and pseudo gradation image restoration method | |
JP3736107B2 (en) | Image processing device | |
JP6428232B2 (en) | Image processing apparatus and image composition method | |
JP4633577B2 (en) | Data compression apparatus and data compression program | |
KR100495001B1 (en) | Image compression encoding method and system | |
JP5595142B2 (en) | Image processing apparatus and image processing method | |
JP5523177B2 (en) | Image coding apparatus and control method thereof | |
JP2012095227A (en) | Image processing system, image processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110119 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120112 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120120 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120319 |
|
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: 20120413 |
|
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: 20120511 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150518 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4996501 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150518 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |